实名唯一性判断,进件微小改动
This commit is contained in:
parent
8e4133d57e
commit
70ae3a3420
|
|
@ -263,9 +263,7 @@ public class UserAppController {
|
||||||
@RequestBody @Valid CertificationDTO certificationDTO) {
|
@RequestBody @Valid CertificationDTO certificationDTO) {
|
||||||
if (Pattern.matches("^[1-9]\\d{5}(?:18|19|20)\\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[1-2]\\d|30|31)\\d{3}[\\dXx]$",
|
if (Pattern.matches("^[1-9]\\d{5}(?:18|19|20)\\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[1-2]\\d|30|31)\\d{3}[\\dXx]$",
|
||||||
certificationDTO.getCertnum())){
|
certificationDTO.getCertnum())){
|
||||||
System.out.println("身份证无误");
|
|
||||||
} else {
|
} else {
|
||||||
System.out.println("身份证有误");
|
|
||||||
return ResultGenerator.genFailResult("身份证号码错误");
|
return ResultGenerator.genFailResult("身份证号码错误");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ public class TokenUtil {
|
||||||
System.out.println(s);
|
System.out.println(s);
|
||||||
String s1 = UUID.randomUUID().toString();
|
String s1 = UUID.randomUUID().toString();
|
||||||
System.out.println(s1);
|
System.out.println(s1);
|
||||||
String param = "{\"type\":\"4\",\"consumeFee\":\"0.01\",\"authCode\":\"286272579674870782\",\"sn\":\"BSJQG01YJ0001\",\"mercOrderNo\":\"\",\"remark\":\"\"}";
|
String param = "{\"orderNumber\":\"LKL_Z_20230612170005985\"}";
|
||||||
Map<String, String> token = getToken(s,s1 , APP_ID,param);
|
Map<String, String> token = getToken(s,s1 , APP_ID,param);
|
||||||
System.out.println(token);
|
System.out.println(token);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,8 @@ public interface IdCardMapper extends BaseMapper<IdCard> {
|
||||||
*/
|
*/
|
||||||
int selectAgentCount(@Param("certNo") String certNo, @Param("userId") String userId);
|
int selectAgentCount(@Param("certNo") String certNo, @Param("userId") String userId);
|
||||||
|
|
||||||
|
Integer getCountIdCard(@Param("certNo") String certNo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取未关联结算信息的对私结算身份证信息
|
* 获取未关联结算信息的对私结算身份证信息
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -70,4 +70,10 @@
|
||||||
AND ua.`userId` != #{userId}
|
AND ua.`userId` != #{userId}
|
||||||
AND t1.`userType` = '01'
|
AND t1.`userType` = '01'
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getCountIdCard" resultType="java.lang.Integer">
|
||||||
|
SELECT count(`certNo`)
|
||||||
|
FROM tb_pluss_id_card
|
||||||
|
WHERE
|
||||||
|
`certNo` = #{certNo}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -395,7 +395,7 @@ public class MerchantStoreController extends BaseNoModelController {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手动后台发起进件
|
* 手动进件后台发起
|
||||||
*/
|
*/
|
||||||
@PassToken
|
@PassToken
|
||||||
@GetMapping(value = "/manualMerchantIncom/{userId}/{id}/{merchantCode}")
|
@GetMapping(value = "/manualMerchantIncom/{userId}/{id}/{merchantCode}")
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,9 @@ public interface IdCardService extends IService<IdCard> {
|
||||||
default int getAgentCount(String certNo, String userId) {
|
default int getAgentCount(String certNo, String userId) {
|
||||||
return ((IdCardMapper) getBaseMapper()).selectAgentCount(certNo, userId);
|
return ((IdCardMapper) getBaseMapper()).selectAgentCount(certNo, userId);
|
||||||
}
|
}
|
||||||
|
default Integer getCountIdCard(String certNo){
|
||||||
|
return ((IdCardMapper) getBaseMapper()).getCountIdCard(certNo);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 获取实名的身份证信息
|
* 获取实名的身份证信息
|
||||||
* @param userId 用户id
|
* @param userId 用户id
|
||||||
|
|
|
||||||
|
|
@ -416,6 +416,11 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void realNameAudit(CertificationDTO certificationDTO) {
|
public void realNameAudit(CertificationDTO certificationDTO) {
|
||||||
|
//验证唯一性
|
||||||
|
Integer countIdCard = idCardService.getCountIdCard(certificationDTO.getCertnum());
|
||||||
|
if (countIdCard > 0){
|
||||||
|
throw new MsgException("身份证已注册");
|
||||||
|
}
|
||||||
UserApp tokenUa = uaService.queryUserAppByToken();
|
UserApp tokenUa = uaService.queryUserAppByToken();
|
||||||
if ("agent".equals(tokenUa.getUserType()) && "ZY_BST".equals(tokenUa.getRoleCode())) {
|
if ("agent".equals(tokenUa.getUserType()) && "ZY_BST".equals(tokenUa.getRoleCode())) {
|
||||||
IdCard condition = new IdCard().setCertNo(certificationDTO.getCertnum());
|
IdCard condition = new IdCard().setCertNo(certificationDTO.getCertnum());
|
||||||
|
|
@ -445,7 +450,6 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||||
userApp.setMerchantCode(merchantCode);
|
userApp.setMerchantCode(merchantCode);
|
||||||
uaService.updateById(userApp);
|
uaService.updateById(userApp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Objects.equals(userApp.getStatus(), 1) || Objects.equals(userApp.getStatus(), 3)) {
|
if (Objects.equals(userApp.getStatus(), 1) || Objects.equals(userApp.getStatus(), 3)) {
|
||||||
throw new MsgException("当前状态不允许修改实名认证信息");
|
throw new MsgException("当前状态不允许修改实名认证信息");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -807,6 +807,8 @@ public class UserAppServiceImpl extends ServiceImpl<UserAppMapper, UserApp> impl
|
||||||
case "5":
|
case "5":
|
||||||
laKalaInterface.createTuoKeInfo(userId);
|
laKalaInterface.createTuoKeInfo(userId);
|
||||||
break;
|
break;
|
||||||
|
case "6":
|
||||||
|
ysAuditServiceV3.merchantAuditV3(userId, false);
|
||||||
default:
|
default:
|
||||||
MsgException.throwException("未知的进件通道");
|
MsgException.throwException("未知的进件通道");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue