parent
d41bbb6ffb
commit
df356c694f
|
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,6 @@ public interface CorpCertificateServiceI {
|
|||
/**
|
||||
* 判断证书编号是否存在
|
||||
*/
|
||||
boolean isExistCertNo(String certNo);
|
||||
boolean isExistCertNo(String certNo, Long id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,6 @@ public interface UserCertificateServiceI {
|
|||
/**
|
||||
* 查询证书编号是否存在
|
||||
*/
|
||||
boolean isExistCertNo(String certNo);
|
||||
boolean isExistCertNo(String certNo, Long id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue