Merge remote-tracking branch 'origin/master'

This commit is contained in:
韩鹏辉 2023-06-14 16:07:12 +08:00
commit f864f69d03
8 changed files with 20 additions and 6 deletions

View File

@ -263,9 +263,7 @@ public class UserAppController {
@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]$",
certificationDTO.getCertnum())){
System.out.println("身份证无误");
} else {
System.out.println("身份证有误");
return ResultGenerator.genFailResult("身份证号码错误");
}
try {

View File

@ -109,7 +109,7 @@ public class TokenUtil {
System.out.println(s);
String s1 = UUID.randomUUID().toString();
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);
System.out.println(token);

View File

@ -53,6 +53,8 @@ public interface IdCardMapper extends BaseMapper<IdCard> {
*/
int selectAgentCount(@Param("certNo") String certNo, @Param("userId") String userId);
Integer getCountIdCard(@Param("certNo") String certNo);
/**
* 获取未关联结算信息的对私结算身份证信息
*

View File

@ -70,4 +70,10 @@
AND ua.`userId` != #{userId}
AND t1.`userType` = '01'
</select>
<select id="getCountIdCard" resultType="java.lang.Integer">
SELECT count(`certNo`)
FROM tb_pluss_id_card
WHERE
`certNo` = #{certNo}
</select>
</mapper>

View File

@ -395,7 +395,7 @@ public class MerchantStoreController extends BaseNoModelController {
/**
* 手动后台发起进件
* 手动进件后台发起
*/
@PassToken
@GetMapping(value = "/manualMerchantIncom/{userId}/{id}/{merchantCode}")

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

@ -421,6 +421,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());
@ -450,7 +455,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("未知的进件通道");
}