From 1eda858d822b33f6e560122f3dd00f657d2a5987 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期四, 10 六月 2021 16:48:06 +0800
Subject: [PATCH] 修改bug

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/EldersAuthServiceImpl.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/EldersAuthServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/EldersAuthServiceImpl.java
index efe1949..3471b81 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/EldersAuthServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/EldersAuthServiceImpl.java
@@ -260,10 +260,10 @@
             this.baseMapper.insert(eldersAuthDO);
 
             //认证成功  添加认证记录
-            ComEldersAuthHistoryRecordDO authHistoryRecordDO = comEldersAuthHistoryRecordMapper.selectOne(new QueryWrapper<ComEldersAuthHistoryRecordDO>()
+            List<ComEldersAuthHistoryRecordDO> authHistoryRecordDOList = comEldersAuthHistoryRecordMapper.selectList(new QueryWrapper<ComEldersAuthHistoryRecordDO>()
                     .lambda().eq(ComEldersAuthHistoryRecordDO::getIdCard,eldersAuthDO.getIdCard()).ge(ComEldersAuthHistoryRecordDO::getCreateAt, DateUtils.getFirstDayOfMonth()));
-            if(authHistoryRecordDO == null){
-                authHistoryRecordDO = new ComEldersAuthHistoryRecordDO();
+            if(authHistoryRecordDOList.isEmpty()){
+                ComEldersAuthHistoryRecordDO authHistoryRecordDO = new ComEldersAuthHistoryRecordDO();
                 authHistoryRecordDO.setUserId(authGetResultDTO.getAuthUserId());
                 authHistoryRecordDO.setAuthId(eldersAuthDO.getId());
                 BeanUtils.copyProperties(eldersAuthDO,authHistoryRecordDO);

--
Gitblit v1.7.1