From d86a37f36ec375f8aa3d3eaee18ea1ad323eba0b Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期五, 26 四月 2024 09:13:04 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 cnas-server/src/main/resources/mapper/CertificationMapper.xml |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/cnas-server/src/main/resources/mapper/CertificationMapper.xml b/cnas-server/src/main/resources/mapper/CertificationMapper.xml
index 55ae44b..825ac46 100644
--- a/cnas-server/src/main/resources/mapper/CertificationMapper.xml
+++ b/cnas-server/src/main/resources/mapper/CertificationMapper.xml
@@ -7,21 +7,22 @@
         c.name,
         c.code,
         organization,
-        `explain`,
+        explanation,
         first_time,
         recently_time,
         expire_time,
         u1.name create_user_name,
         c.create_time,
-        now()>expire_time?0:1 as state,
+        case when now() &gt; expire_time then 0
+        else 1 end as state,
         image_url,
         file_url
         from certification c
         left join user u1 on c.create_user = u1.id
         order by c.id desc) a
-        group by a.name
         <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
             ${ew.customSqlSegment}
         </if>
+        group by name
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3