|
|
|
@@ -85,15 +85,12 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv |
|
|
|
@Override |
|
|
|
public ResultData addReceiver(WxMerchant merchant) { |
|
|
|
|
|
|
|
WxAppinfo subAppInfo = new WxAppinfo(); |
|
|
|
subAppInfo.setTenantId(merchant.getTenantId()); |
|
|
|
subAppInfo.setType(EnumAppType.C.getCode()); |
|
|
|
|
|
|
|
subAppInfo = wxAppinfoMapper.findList(subAppInfo).get(0); |
|
|
|
WxPayAccount payAccount = wxPayAccountMapper.selectByPrimaryKey(subAppInfo.getPayId()); |
|
|
|
//WxPayAccount mainPayAccount = wxPayAccountMapper.selectByPrimaryKey(new Long(EnumPayDomain.PAY_DOMAIN_MASTER_ACCOUNT_ID.getCode())); |
|
|
|
//WxAppinfo mainAppInfo = wxAppinfoMapper.selectByPrimaryKey(new Long(EnumPayDomain.PAY_DOMAIN_MASTER_APPINFO_ID.getCode())); |
|
|
|
WxAppinfo appInfo = new WxAppinfo(); |
|
|
|
appInfo.setTenantId(merchant.getTenantId()); |
|
|
|
appInfo.setType(EnumAppType.C.getCode()); |
|
|
|
|
|
|
|
appInfo = wxAppinfoMapper.findList(appInfo).get(0); |
|
|
|
WxPayAccount payAccount = wxPayAccountMapper.selectByPrimaryKey(appInfo.getPayId()); |
|
|
|
|
|
|
|
WxProfitSharingReceiver receiver = new WxProfitSharingReceiver(); |
|
|
|
receiver.setMerchantId(merchant.getId()); |
|
|
|
@@ -108,12 +105,10 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv |
|
|
|
|
|
|
|
//添加分账账户 |
|
|
|
WxProfitSharingReceiverP wxProfitSharingReceiverP = new WxProfitSharingReceiverP(); |
|
|
|
//wxProfitSharingP.setAppid(mainAppInfo.getAppId()); |
|
|
|
//wxProfitSharingP.setMch_id(mainPayAccount.getMchId()); |
|
|
|
wxProfitSharingReceiverP.setAppid(subAppInfo.getAppId()); |
|
|
|
wxProfitSharingReceiverP.setAppid(appInfo.getParentAppId()); |
|
|
|
wxProfitSharingReceiverP.setMch_id(payAccount.getMchId()); |
|
|
|
wxProfitSharingReceiverP.setSub_appid(subAppInfo.getAppId()); |
|
|
|
wxProfitSharingReceiverP.setSub_mch_id(payAccount.getMchId()); |
|
|
|
wxProfitSharingReceiverP.setSub_appid(appInfo.getAppId()); |
|
|
|
wxProfitSharingReceiverP.setSub_mch_id(payAccount.getSubMchId()); |
|
|
|
wxProfitSharingReceiverP.setNonce_str(Utility.generate32UUID()); |
|
|
|
|
|
|
|
|
|
|
|
@@ -151,15 +146,12 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv |
|
|
|
|
|
|
|
@Override |
|
|
|
public ResultData delReceiver(WxMerchant merchant) { |
|
|
|
WxAppinfo subAppInfo = new WxAppinfo(); |
|
|
|
subAppInfo.setTenantId(merchant.getTenantId()); |
|
|
|
subAppInfo.setType(EnumAppType.C.getCode()); |
|
|
|
|
|
|
|
subAppInfo = wxAppinfoMapper.findList(subAppInfo).get(0); |
|
|
|
WxPayAccount payAccount = wxPayAccountMapper.selectByPrimaryKey(subAppInfo.getPayId()); |
|
|
|
//WxPayAccount mainPayAccount = wxPayAccountMapper.selectByPrimaryKey(new Long(EnumPayDomain.PAY_DOMAIN_MASTER_ACCOUNT_ID.getCode())); |
|
|
|
//WxAppinfo mainAppInfo = wxAppinfoMapper.selectByPrimaryKey(new Long(EnumPayDomain.PAY_DOMAIN_MASTER_APPINFO_ID.getCode())); |
|
|
|
WxAppinfo appInfo = new WxAppinfo(); |
|
|
|
appInfo.setTenantId(merchant.getTenantId()); |
|
|
|
appInfo.setType(EnumAppType.C.getCode()); |
|
|
|
|
|
|
|
appInfo = wxAppinfoMapper.findList(appInfo).get(0); |
|
|
|
WxPayAccount payAccount = wxPayAccountMapper.selectByPrimaryKey(appInfo.getPayId()); |
|
|
|
|
|
|
|
WxProfitSharingReceiver receiver = new WxProfitSharingReceiver(); |
|
|
|
receiver.setMerchantId(merchant.getId()); |
|
|
|
@@ -174,12 +166,10 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv |
|
|
|
|
|
|
|
//删除分账账户 |
|
|
|
WxProfitSharingReceiverP wxProfitSharingReceiverP = new WxProfitSharingReceiverP(); |
|
|
|
//wxProfitSharingP.setAppid(mainAppInfo.getAppId()); |
|
|
|
//wxProfitSharingP.setMch_id(mainPayAccount.getMchId()); |
|
|
|
wxProfitSharingReceiverP.setAppid(subAppInfo.getAppId()); |
|
|
|
wxProfitSharingReceiverP.setAppid(appInfo.getParentAppId()); |
|
|
|
wxProfitSharingReceiverP.setMch_id(payAccount.getMchId()); |
|
|
|
wxProfitSharingReceiverP.setSub_appid(subAppInfo.getAppId()); |
|
|
|
wxProfitSharingReceiverP.setSub_mch_id(payAccount.getMchId()); |
|
|
|
wxProfitSharingReceiverP.setSub_appid(appInfo.getAppId()); |
|
|
|
wxProfitSharingReceiverP.setSub_mch_id(payAccount.getSubMchId()); |
|
|
|
wxProfitSharingReceiverP.setNonce_str(Utility.generate32UUID()); |
|
|
|
|
|
|
|
|
|
|
|
|