后台提交到三方更改资料更改

This commit is contained in:
liuyingfang 2023-10-16 14:46:06 +08:00
parent 3f0179a95f
commit bc21e05fd2
2 changed files with 40 additions and 38 deletions

View File

@ -303,8 +303,8 @@ public class MerchantInfoService {
}
bankCardMapper.updateByPrimaryKeySelective(account.getBankCard());
idCardMapper.updateByPrimaryKeySelective(account.getIdcard());
// merchantService.updateMerchantBase(account.);
//三方
merchantService.updateMerchantBase(Integer.valueOf(account.getUserid()),account.getBankCard(),account.getIdcard());
return new RespBody("000000");
}

View File

@ -180,17 +180,12 @@ public class MerchantService {
* @param userId
*/
public void updateMerchantBase(Integer userId, TbPlussBankCard bankCard,TbPlussIdCard idCard) {
MsgException.checkNull(userId,"请选择用户");
//获取用户信息
TbPlussUserInfo userInfo = tbPlussUserInfoMapper.selectByPrimaryKey(Long.valueOf(userId));
MsgException.checkNull(userInfo,"用户信息不存在");
if (userInfo != null) {
//判断进件信息是否存在
TbPlussMerchantBaseInfo baseInfo = tbPlussMerchantBaseInfoMapper.selectByUserId(String.valueOf(userId));
MsgException.checkNull(baseInfo,"请完善进件信息");
if (baseInfo != null) {
//判断用户是否有进件
List<TbPlussMerchantChannelStatus> merchantCodes = tbPlussMerchantChannelStatusMapper.getByMerchantCodesAudit(baseInfo.getMerchantcode());
if (merchantCodes != null) {
@ -199,25 +194,32 @@ public class MerchantService {
MsgException.throwException("用户进件信息有误");
}
if (size == 1) {
Integer channel = merchantCodes.get(0).getChannel();
//不同的通道
//一个通道
updateChannel(merchantCodes.get(0).getChannel(), merchantCodes.get(0).getMerchantid(), bankCard,idCard,userInfo);
}
if (size == 2) {
//两个通道
updateChannel(merchantCodes.get(0).getChannel(), merchantCodes.get(0).getMerchantid(), bankCard,idCard,userInfo);
updateChannel(merchantCodes.get(1).getChannel(), merchantCodes.get(1).getMerchantid(), bankCard,idCard,userInfo);
}
}
}
}
}
public void updateChannel(Integer channel,String MerchantId, TbPlussBankCard bankCard,
TbPlussIdCard idCard, TbPlussUserInfo userInfo){
switch (channel) {
case 1:
sxfMerchantAuditService.updateMerchantIdCard(merchantCodes.get(0).getMerchantid(),bankCard,idCard);
sxfMerchantAuditService.updateMerchantIdCard(MerchantId, bankCard, idCard);
break;
case 4:
ysAuditServiceV3.updateMerchantBankCard(merchantCodes.get(0).getMerchantid(),idCard,bankCard,channel);
ysAuditServiceV3.updateMerchantIdCard(merchantCodes.get(0).getMerchantid(),idCard,channel,userInfo);
ysAuditServiceV3.updateMerchantBankCard(MerchantId, idCard, bankCard, channel);
ysAuditServiceV3.updateMerchantIdCard(MerchantId, idCard, channel, userInfo);
break;
case 5:
break;
default:
break;
}
}
}
}
}