From f7c16d24f7cb0d2b9e03ec24bfdbb72a11def5f9 Mon Sep 17 00:00:00 2001
From: puhanshu <a9236326>
Date: 星期三, 13 十月 2021 13:08:46 +0800
Subject: [PATCH] 爱心义仓修改
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActSignDAO.java | 113 ++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 73 insertions(+), 40 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..3675583 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,12 +1,20 @@
package com.panzhihua.service_community.dao;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.panzhihua.common.model.vos.community.ActivitySignVO;
-import com.panzhihua.service_community.model.dos.ComActActSignDO;
+import java.util.List;
+import java.util.Map;
+
+import com.panzhihua.common.model.vos.community.ComActActSignExcelVO;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
-import java.util.List;
+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;
/**
* @program: springcloud_k8s_panzhihuazhihuishequ
@@ -16,40 +24,65 @@
**/
@Mapper
public interface ComActActSignDAO extends BaseMapper<ComActActSignDO> {
- @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.phone,\n" +
- "a.create_at \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" +
- "<if test='phone != null and phone.trim() != ""'>" +
- "AND u.phone = #{phone} \n" +
- " </if> " +
- "<if test='name != null and name.trim() != ""'>" +
- "AND u.`name` = #{name} \n" +
- " </if> " +
- "<if test='identity != null and identity.trim() != "" and identity=党员'>" +
- "AND is_partymember = 1 \n" +
- " </if> " +
- "<if test='identity != null and identity.trim() != "" and identity=志愿者'>" +
- "AND is_partymember = 2 and is_volunteer=1 \n" +
- " </if> " +
- "<if test='identity != null and identity.trim() != "" and identity=居民'>" +
- "AND is_partymember = 2 and is_volunteer=2 \n" +
- " </if> " +
- " order by a.create_at desc "+
- "</script>")
- List<ActivitySignVO> listActivitySign(ActivitySignVO activitySignVO);
+ // 居民 党员 志愿者 1 2 3
+ @Select("<script> " + "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, " + "u.tags, " + "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 = #{activitySignVO.activityId} "
+ + "<if test='activitySignVO.phone != null and activitySignVO.phone != ""'>"
+ + "AND u.phone = #{activitySignVO.phone} " + " </if> "
+ + "<if test='activitySignVO.tags != null and activitySignVO.tags != ""'>"
+ + "AND u.tags like concat('%',#{activitySignVO.tags},'%') " + " </if> "
+ + "<if test='activitySignVO.name != null and activitySignVO.name != ""'>"
+ + "AND u.`name` = #{activitySignVO.name} " + " </if> "
+ + "<if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==1'>"
+ + "AND u.is_partymember = 0 and a.is_volunteer=0 " + " </if> "
+ + "<if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==2'>"
+ + "AND u.is_partymember = 1 " + " </if> "
+ + "<if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==3'>"
+ + "AND a.is_volunteer=1 " + " </if> " + "<if test='activitySignVO.type != null and activitySignVO.type != 0'>"
+ + "AND a.is_volunteer=#{activitySignVO.type}-1 " + " </if> " + " order by a.create_at desc " + "</script>")
+ IPage<ActivitySignVO> listActivitySign(Page page, @Param("activitySignVO") ActivitySignVO activitySignVO);
+
+ @Select("<script> " + "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, " + "u.openid, " + "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 = #{activitySignVO.activityId} "
+ + "<if test='activitySignVO.phone != null and activitySignVO.phone != ""'>"
+ + "AND u.phone = #{activitySignVO.phone} " + " </if> "
+ + "<if test='activitySignVO.name != null and activitySignVO.name != ""'>"
+ + "AND u.`name` = #{activitySignVO.name} " + " </if> "
+ + "<if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==1'>"
+ + "AND u.is_partymember = 0 and a.is_volunteer=0 " + " </if> "
+ + "<if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==2'>"
+ + "AND u.is_partymember = 1 " + " </if> "
+ + "<if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==3'>"
+ + "AND a.is_volunteer=1 " + " </if> " + "<if test='activitySignVO.type != null and activitySignVO.type != 0'>"
+ + "AND a.is_volunteer=#{activitySignVO.type}-1 " + " </if> " + " order by a.create_at desc " + "</script>")
+ List<ActivitySignVO> listActivitySigns(@Param("activitySignVO") ActivitySignVO activitySignVO);
+
+ List<ComActActSignExcelVO> getSignLists (@Param("activitySignVO") 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 != ""'>"
+ + " and su.phone like concat (#{activityPeopleListDTO.phone},'%') " + " </if> "
+ + "<if test='activityPeopleListDTO.cardNo != null and activityPeopleListDTO.cardNo != ""'>"
+ + " AND su.id_card = #{activityPeopleListDTO.cardNo} " + " </if> "
+ + "<if test='activityPeopleListDTO.name != null and activityPeopleListDTO.name != ""'>"
+ + " AND su.name like concat (#{activityPeopleListDTO.name},'%') " + " </if> " + " </script>")
+ IPage<ActActivityPeopleListVO> getActActivityPeopleList(Page page,
+ @Param("activityPeopleListDTO") ScreenActActivityPeopleListDTO activityPeopleListDTO);
+
+ @Select("select openid from sys_user where user_id = #{userId}")
+ Map<String, String> getUserOpenId(@Param("userId") Long userId);
+
+ /**
+ * 获取需要默认好评的记录
+ * @param activityIds 活动id list
+ * @return 需要默认好评的记录列表
+ */
+ List<ComActActSignDO> selectNeedEvaluateSignRecords(@Param("activityIds") List<Long> activityIds);
}
--
Gitblit v1.7.1