fix(customer):修复重复认证时重复插入最终记录表的bug
This commit is contained in:
parent
fe18fade77
commit
8c387f3649
@ -74,10 +74,17 @@ public class CertificationAuditServiceImpl extends ServiceImpl<CertificationAudi
|
|||||||
.build());
|
.build());
|
||||||
|
|
||||||
// 更新最终信息表
|
// 更新最终信息表
|
||||||
workerCertificationMapper.insert(WorkerCertification.builder()
|
WorkerCertification agencyCertification = WorkerCertification.builder()
|
||||||
.id(userId)
|
.id(userId)
|
||||||
.certificationStatus(CertificationStatusEnum.PROGRESSING.getStatus())
|
.certificationStatus(CertificationStatusEnum.PROGRESSING.getStatus())
|
||||||
.build());
|
.build();
|
||||||
|
if (ChainWrappers.lambdaQueryChain(workerCertificationMapper)
|
||||||
|
.eq(WorkerCertification::getId, userId)
|
||||||
|
.count() == 0) {
|
||||||
|
workerCertificationMapper.insert(agencyCertification);
|
||||||
|
} else {
|
||||||
|
workerCertificationMapper.updateById(agencyCertification);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -104,10 +111,17 @@ public class CertificationAuditServiceImpl extends ServiceImpl<CertificationAudi
|
|||||||
.build());
|
.build());
|
||||||
|
|
||||||
// 更新最终信息表
|
// 更新最终信息表
|
||||||
agencyCertificationMapper.insert(AgencyCertification.builder()
|
AgencyCertification agencyCertification = AgencyCertification.builder()
|
||||||
.id(userId)
|
.id(userId)
|
||||||
.certificationStatus(CertificationStatusEnum.PROGRESSING.getStatus())
|
.certificationStatus(CertificationStatusEnum.PROGRESSING.getStatus())
|
||||||
.build());
|
.build();
|
||||||
|
if (ChainWrappers.lambdaQueryChain(agencyCertificationMapper)
|
||||||
|
.eq(AgencyCertification::getId, userId)
|
||||||
|
.count() == 0) {
|
||||||
|
agencyCertificationMapper.insert(agencyCertification);
|
||||||
|
} else {
|
||||||
|
agencyCertificationMapper.updateById(agencyCertification);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user