3
0

2 Коммитууд 3aedce907d ... ba1acfb2a8

Эзэн SHA1 Мессеж Огноо
  Danj0rr ba1acfb2a8 Merge remote-tracking branch 'origin/develop' into develop 11 сар өмнө
  Danj0rr 79e6608247 修复出现多条(证件号码,证件类型)重复数据查询报错情况 11 сар өмнө

+ 2 - 2
src/main/java/com/kexun/controller/CooperatorController.java

@@ -129,8 +129,8 @@ public class CooperatorController {
 
         CooperatorInfo cooperatorInfo = CooperatorService.findByID(cooperatorId);
 
-        CooperatorInfo dupNumCooperatorInfo=CooperatorService.findByCorpCertificateNumAndType(req.getString("corp_certificate_num"),req.getString("corp_certificate_type"));
-        if (dupNumCooperatorInfo!=null)
+        List<CooperatorInfo> dupNumCooperatorInfo=CooperatorService.findByCorpCertificateNumAndType(req.getString("corp_certificate_num"),req.getString("corp_certificate_type"));
+        if (!dupNumCooperatorInfo.isEmpty())
             return Result.error("证件号码重复!");
 
 

+ 1 - 1
src/main/java/com/kexun/service/CooperatorService.java

@@ -14,7 +14,7 @@ import java.util.List;
  */
 public interface CooperatorService extends IService<CooperatorInfo> {
     CooperatorInfo findByCooperatorNum(String partnerName);
-    CooperatorInfo findByCorpCertificateNumAndType(String corpCertificateNum, String corpCertificateType);
+    List<CooperatorInfo>findByCorpCertificateNumAndType(String corpCertificateNum, String corpCertificateType);
 //    List<CooperatorField> findCooperatorFieldByNum(String cooperatorNum);
     List<CooperatorField> findCooperatorFieldByNum(String templateId);
     List<CooperatorProduct> findCooperatorProductByNum(String cooperatorNum);

+ 2 - 2
src/main/java/com/kexun/service/impl/CooperatorServiceImpl.java

@@ -27,11 +27,11 @@ public class CooperatorServiceImpl extends ServiceImpl<CooperatorMapper, Coopera
     CooperatorMapper cooperatorMapper;
 
     @Override
-    public CooperatorInfo findByCorpCertificateNumAndType(String corpCertificateNum,String corpCertificateType) {
+    public List<CooperatorInfo> findByCorpCertificateNumAndType(String corpCertificateNum,String corpCertificateType) {
         QueryWrapper wrapper=new QueryWrapper();
         wrapper.eq("corp_certificate_num",corpCertificateNum);
         wrapper.eq("corp_certificate_type",corpCertificateType);
-        return getOne(wrapper);
+        return list(wrapper);
     }
 
     @Override