实名唯一性判断,进件微小改动

This commit is contained in:
liuyingfang
2023-06-13 17:49:46 +08:00
parent 8e4133d57e
commit 70ae3a3420
8 changed files with 20 additions and 6 deletions

View File

@@ -20,7 +20,9 @@ public interface IdCardService extends IService<IdCard> {
default int getAgentCount(String certNo, String userId) {
return ((IdCardMapper) getBaseMapper()).selectAgentCount(certNo, userId);
}
default Integer getCountIdCard(String certNo){
return ((IdCardMapper) getBaseMapper()).getCountIdCard(certNo);
}
/**
* 获取实名的身份证信息
* @param userId 用户id

View File

@@ -416,6 +416,11 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
@Override
@Transactional(rollbackFor = Exception.class)
public void realNameAudit(CertificationDTO certificationDTO) {
//验证唯一性
Integer countIdCard = idCardService.getCountIdCard(certificationDTO.getCertnum());
if (countIdCard > 0){
throw new MsgException("身份证已注册");
}
UserApp tokenUa = uaService.queryUserAppByToken();
if ("agent".equals(tokenUa.getUserType()) && "ZY_BST".equals(tokenUa.getRoleCode())) {
IdCard condition = new IdCard().setCertNo(certificationDTO.getCertnum());
@@ -445,7 +450,6 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
userApp.setMerchantCode(merchantCode);
uaService.updateById(userApp);
}
if (Objects.equals(userApp.getStatus(), 1) || Objects.equals(userApp.getStatus(), 3)) {
throw new MsgException("当前状态不允许修改实名认证信息");
}

View File

@@ -807,6 +807,8 @@ public class UserAppServiceImpl extends ServiceImpl<UserAppMapper, UserApp> impl
case "5":
laKalaInterface.createTuoKeInfo(userId);
break;
case "6":
ysAuditServiceV3.merchantAuditV3(userId, false);
default:
MsgException.throwException("未知的进件通道");
}