|
|
|
@@ -15,6 +15,7 @@ import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.mapper.*; |
|
|
|
import com.iformall.service.*; |
|
|
|
import com.iformall.utils.BeanMapping; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@@ -90,6 +91,10 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
@Autowired |
|
|
|
WxPropertyContractMapper wxPropertyContractMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxProfitSharingReceiverMapper wxProfitSharingReceiverMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public PageInfo<WxMerchant> listAsPage(WxMerchant record, Integer pageIndex, Integer pageSize) { |
|
|
|
|
|
|
|
@@ -644,4 +649,30 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
wxMerchantMapper.updateByPrimaryKeySelective(wxMerchant); |
|
|
|
return new ResultData(Result.SUCCESS, "操作成功"); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public ResultData useAccount(WxProfitSharingReceiver wxProfitSharingReceiver) { |
|
|
|
WxProfitSharingReceiver profitSharingReceiver = wxProfitSharingReceiverMapper.selectByPrimaryKey(wxProfitSharingReceiver.getId()); |
|
|
|
profitSharingReceiver.setIsUse(wxProfitSharingReceiver.getIsUse()); |
|
|
|
profitSharingReceiver.setUpdateTime(new Date()); |
|
|
|
wxProfitSharingReceiverMapper.updateByPrimaryKeySelective(profitSharingReceiver); |
|
|
|
|
|
|
|
Long merchantId = profitSharingReceiver.getMerchantId(); |
|
|
|
String accout = profitSharingReceiver.getReceiverAccount(); |
|
|
|
WxMerchant wxMerchant = wxMerchantMapper.selectByPrimaryKey(merchantId); |
|
|
|
String linkPhone = wxMerchant.getLinkPhone(); |
|
|
|
String merchantName = wxMerchant.getName(); |
|
|
|
String tenantId = wxProfitSharingReceiver.getTenantId(); |
|
|
|
if (StringUtils.isEmpty(linkPhone)) { |
|
|
|
return new ResultData(Result.SUCCESS, "操作成功"); |
|
|
|
} |
|
|
|
//发信息 |
|
|
|
Integer isUse = wxProfitSharingReceiver.getIsUse(); |
|
|
|
Integer type = EnumMsgModel.ACCEPT_SHARING_ACCOUNT_NOTIFY_MANAGER.getCode(); |
|
|
|
if (isUse.equals(EnumProfitSharingUse.NO.getCode())) { |
|
|
|
type = EnumMsgModel.ACCEPT_SHARING_ACCOUNT_NOTIFY_MANAGER.getCode(); |
|
|
|
} |
|
|
|
wxProfitSharingReceiverService.sendMsg(linkPhone, accout, merchantName, null, type, tenantId); |
|
|
|
return new ResultData(Result.SUCCESS, "操作成功"); |
|
|
|
} |
|
|
|
} |