1、新增证书编号校验接口

2、新增相关方类型
main
shenzhidan 2026-01-27 17:14:22 +08:00
parent d41bbb6ffb
commit df356c694f
10 changed files with 18 additions and 15 deletions

View File

@ -84,8 +84,8 @@ public class CorpCertificateController {
@ApiOperation("判断证书编号是否存在")
@GetMapping("/isExistCertNo")
public SingleResponse<Boolean> isExistCertNo(@RequestParam(value = "certNo") String certNo) {
return SingleResponse.of(corpCertificateService.isExistCertNo(certNo));
public SingleResponse<Boolean> isExistCertNo(@RequestParam(value = "certNo") String certNo, @RequestParam(value = "id", required = false) Long id) {
return SingleResponse.of(corpCertificateService.isExistCertNo(certNo, id));
}
}

View File

@ -96,8 +96,8 @@ public class UserCertificateController {
@ApiOperation("判断证件编号是否已存在")
@GetMapping("/isExistCertNo")
public SingleResponse<Boolean> isExistCertNo(@RequestParam(value = "certNo") String certNo) {
return SingleResponse.of(userCertificateService.isExistCertNo(certNo));
public SingleResponse<Boolean> isExistCertNo(@RequestParam(value = "certNo") String certNo, @RequestParam(value = "id", required = false) Long id) {
return SingleResponse.of(userCertificateService.isExistCertNo(certNo, id));
}
}

View File

@ -79,9 +79,11 @@ public class CorpCertificateQueryExe {
/**
*
*/
public boolean checkCertNoExist(String certNo) {
public boolean checkCertNoExist(String certNo, Long id) {
return corpCertificateRepository.count(new LambdaQueryWrapper<CorpCertificateDO>()
.eq(CorpCertificateDO::getCertificateCode, certNo)) > 0;
.eq(CorpCertificateDO::getCertificateCode, certNo)
.ne(id != null, CorpCertificateDO::getId, id)
) > 0;
}

View File

@ -132,9 +132,10 @@ public class UserCertificateQueryExe {
/**
*
*/
public boolean checkCertNoExist(String certNo) {
public boolean checkCertNoExist(String certNo, Long id) {
return userCertificateRepository.count(new LambdaQueryWrapper<UserCertificateDO>()
.eq(UserCertificateDO::getCertificateCode, certNo)
.ne(id != null, UserCertificateDO::getId, id)
) > 0;
}

View File

@ -71,8 +71,8 @@ public class CorpCertificateServiceImpl implements CorpCertificateServiceI {
}
@Override
public boolean isExistCertNo(String certNo) {
return corpCertificateQueryExe.checkCertNoExist(certNo);
public boolean isExistCertNo(String certNo, Long id) {
return corpCertificateQueryExe.checkCertNoExist(certNo, id);
}
}

View File

@ -77,8 +77,8 @@ public class UserCertificateServiceImpl implements UserCertificateServiceI {
}
@Override
public boolean isExistCertNo(String certNo) {
return userCertificateQueryExe.checkCertNoExist(certNo);
public boolean isExistCertNo(String certNo, Long id) {
return userCertificateQueryExe.checkCertNoExist(certNo, id);
}
}

View File

@ -37,6 +37,6 @@ public interface CorpCertificateServiceI {
/**
*
*/
boolean isExistCertNo(String certNo);
boolean isExistCertNo(String certNo, Long id);
}

View File

@ -43,6 +43,6 @@ public interface UserCertificateServiceI {
/**
*
*/
boolean isExistCertNo(String certNo);
boolean isExistCertNo(String certNo, Long id);
}

View File

@ -33,7 +33,7 @@
<if test="params.corpType != null">
AND (
(#{params.corpType} = 0 AND ci.type IN (0,1))
OR (#{params.corpType} = 1 AND ci.type IN (3,4,5))
OR (#{params.corpType} = 1 AND ci.type IN (3,4,5,6))
)
</if>

View File

@ -183,7 +183,7 @@
<if test="params.corpType != null">
AND (
(#{params.corpType} = 0 AND ci.type IN (0,1))
OR (#{params.corpType} = 1 AND ci.type IN (3,4,5))
OR (#{params.corpType} = 1 AND ci.type IN (3,4,5,6))
)
</if>