From 54ad966d0b142c97fc659263b51d1ea5d7b5c7c6 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期五, 28 五月 2021 16:17:08 +0800
Subject: [PATCH] 修改bug

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActSignDAO.java |   33 +++++++++++++++++----------------
 1 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActSignDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActSignDAO.java
index a36855e..6a22a31 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActSignDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActSignDAO.java
@@ -16,19 +16,17 @@
  **/
 @Mapper
 public interface ComActActSignDAO extends BaseMapper<ComActActSignDO> {
+//    居民 党员 志愿者 1 2 3
     @Select("<script> " +
             "SELECT\n" +
-            "a.id,\n" +
-            "u.NAME,\n" +
-            "CASE\n" +
-            "\n" +
-            "WHEN u.is_partymember = 1 THEN\n" +
-            "'党员' \n" +
-            "WHEN u.is_volunteer = 1 THEN\n" +
-            "'支援者' ELSE '居民' \n" +
-            "END identity,\n" +
+            "u.user_id id,\n" +
+            "u.image_url,\n" +
+            "u.name,\n" +
+            "u.nick_name,\n" +
+            "case WHEN u.is_partymember = 1 THEN '党员' WHEN a.is_volunteer = 1 THEN '志愿者' ELSE '居民' END identity,\n" +
             "u.phone,\n" +
-            "a.create_at \n" +
+            "a.create_at, \n" +
+            "a.is_volunteer \n" +
             "FROM\n" +
             "com_act_act_sign a\n" +
             "JOIN sys_user u ON a.user_id = u.user_id \n" +
@@ -40,14 +38,17 @@
             "<if test='name != null and name.trim() != &quot;&quot;'>" +
             "AND u.`name` = #{name} \n" +
             " </if> " +
-            "<if test='identity != null and identity.trim() != &quot;&quot; and identity=党员'>" +
-            "AND is_partymember = 1 \n" +
+            "<if test='identity != null and identity.trim() != &quot;&quot; and identity==1'>" +
+            "AND u.is_partymember = 0 and a.is_volunteer=0 \n" +
             " </if> " +
-            "<if test='identity != null and identity.trim() != &quot;&quot; and identity=志愿者'>" +
-            "AND is_partymember = 2 and is_volunteer=1  \n" +
+            "<if test='identity != null and identity.trim() != &quot;&quot; and identity==2'>" +
+            "AND u.is_partymember = 1   \n" +
             " </if> " +
-            "<if test='identity != null and identity.trim() != &quot;&quot; and identity=居民'>" +
-            "AND is_partymember = 2 and is_volunteer=2  \n" +
+            "<if test='identity != null and identity.trim() != &quot;&quot; and identity==3'>" +
+            "AND a.is_volunteer=1  \n" +
+            " </if> " +
+            "<if test='type != null and type != 0'>" +
+            "AND a.is_volunteer=#{type}-1  \n" +
             " </if> " +
             " order by a.create_at desc "+
             "</script>")

--
Gitblit v1.7.1