From d01be9f1ec9a393818ea64deca3cbe7fa9372e08 Mon Sep 17 00:00:00 2001
From: xyh <18782104331@139.com>
Date: 星期三, 23 六月 2021 18:21:21 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/test' into test

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActSignDAO.java |   70 +++++++++++++++++++++++++----------
 1 files changed, 50 insertions(+), 20 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 6a22a31..3c13c21 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
@@ -1,9 +1,14 @@
 package com.panzhihua.service_community.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityPeopleListDTO;
 import com.panzhihua.common.model.vos.community.ActivitySignVO;
+import com.panzhihua.common.model.vos.community.screen.work.ActActivityPeopleListVO;
 import com.panzhihua.service_community.model.dos.ComActActSignDO;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 
 import java.util.List;
@@ -18,39 +23,64 @@
 public interface ComActActSignDAO extends BaseMapper<ComActActSignDO> {
 //    居民 党员 志愿者 1 2 3
     @Select("<script> " +
-            "SELECT\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.is_volunteer \n" +
-            "FROM\n" +
-            "com_act_act_sign a\n" +
-            "JOIN sys_user u ON a.user_id = u.user_id \n" +
-            "WHERE\n" +
-            "a.activity_id = #{activityId} \n" +
+            "SELECT " +
+            "u.user_id id, " +
+            "u.image_url, " +
+            "u.name, " +
+            "u.nick_name, " +
+            "case WHEN u.is_partymember = 1 THEN '党员' WHEN a.is_volunteer = 1 THEN '志愿者' ELSE '居民' END identity, " +
+            "u.phone, " +
+            "a.create_at,  " +
+            "a.is_volunteer  " +
+            "FROM " +
+            "com_act_act_sign a " +
+            "JOIN sys_user u ON a.user_id = u.user_id  " +
+            "WHERE " +
+            "a.activity_id = #{activityId}  " +
             "<if test='phone != null and phone.trim() != &quot;&quot;'>" +
-            "AND u.phone = #{phone} \n" +
+            "AND u.phone = #{phone}  " +
             " </if> " +
             "<if test='name != null and name.trim() != &quot;&quot;'>" +
-            "AND u.`name` = #{name} \n" +
+            "AND u.`name` = #{name}  " +
             " </if> " +
             "<if test='identity != null and identity.trim() != &quot;&quot; and identity==1'>" +
-            "AND u.is_partymember = 0 and a.is_volunteer=0 \n" +
+            "AND u.is_partymember = 0 and a.is_volunteer=0  " +
             " </if> " +
             "<if test='identity != null and identity.trim() != &quot;&quot; and identity==2'>" +
-            "AND u.is_partymember = 1   \n" +
+            "AND u.is_partymember = 1    " +
             " </if> " +
             "<if test='identity != null and identity.trim() != &quot;&quot; and identity==3'>" +
-            "AND a.is_volunteer=1  \n" +
+            "AND a.is_volunteer=1   " +
             " </if> " +
             "<if test='type != null and type != 0'>" +
-            "AND a.is_volunteer=#{type}-1  \n" +
+            "AND a.is_volunteer=#{type}-1   " +
             " </if> " +
             " order by a.create_at desc "+
             "</script>")
     List<ActivitySignVO> listActivitySign(ActivitySignVO activitySignVO);
+
+    @Select("<script> " +
+            "SELECT " +
+            " caas.user_id, " +
+            " su.NAME, " +
+            "CASE " +
+            "  WHEN su.is_volunteer = 1 THEN " +
+            "  '志愿者' ELSE '居民'  " +
+            " END identity, " +
+            " su.phone, " +
+            " caas.create_at  " +
+            "FROM " +
+            " com_act_act_sign AS caas " +
+            " LEFT JOIN sys_user AS su ON su.user_id = caas.user_id where caas.activity_id = #{activityPeopleListDTO.activityId} " +
+            "<if test='activityPeopleListDTO.phone != null and activityPeopleListDTO.phone != &quot;&quot;'>" +
+            " and su.phone like concat (#{activityPeopleListDTO.phone},'%') "+
+            " </if> " +
+            "<if test='activityPeopleListDTO.cardNo != null and activityPeopleListDTO.cardNo != &quot;&quot;'>" +
+            " AND su.id_card = #{activityPeopleListDTO.cardNo}  " +
+            " </if> " +
+            "<if test='activityPeopleListDTO.name != null and activityPeopleListDTO.name != &quot;&quot;'>" +
+            " AND su.name like concat (#{activityPeopleListDTO.name},'%') "+
+            " </if> " +
+            " </script>")
+    IPage<ActActivityPeopleListVO> getActActivityPeopleList(Page page,@Param("activityPeopleListDTO") ScreenActActivityPeopleListDTO activityPeopleListDTO);
 }

--
Gitblit v1.7.1