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

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()); bankCardMapper.updateByPrimaryKeySelective(account.getBankCard());
idCardMapper.updateByPrimaryKeySelective(account.getIdcard()); idCardMapper.updateByPrimaryKeySelective(account.getIdcard());
//三方
// merchantService.updateMerchantBase(account.); merchantService.updateMerchantBase(Integer.valueOf(account.getUserid()),account.getBankCard(),account.getIdcard());
return new RespBody("000000"); return new RespBody("000000");
} }

View File

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