From de91c84954157bb9f8b6d938cbe0b1b51fb6e65d Mon Sep 17 00:00:00 2001
From: CeDo <cedoogle@gmail.com>
Date: 星期五, 07 五月 2021 15:23:57 +0800
Subject: [PATCH] bugfixed:新增便民服务商家 报错
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActSignDAO.java | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 56 insertions(+), 0 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
new file mode 100644
index 0000000..6a22a31
--- /dev/null
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActSignDAO.java
@@ -0,0 +1,56 @@
+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 org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * @program: springcloud_k8s_panzhihuazhihuishequ
+ * @description: 社区活动报名记录
+ * @author: huang.hongfa weixin hhf9596 qq 959656820
+ * @create: 2020-12-07 14:09
+ **/
+@Mapper
+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" +
+ "<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==1'>" +
+ "AND u.is_partymember = 0 and a.is_volunteer=0 \n" +
+ " </if> " +
+ "<if test='identity != null and identity.trim() != "" and identity==2'>" +
+ "AND u.is_partymember = 1 \n" +
+ " </if> " +
+ "<if test='identity != null and identity.trim() != "" 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>")
+ List<ActivitySignVO> listActivitySign(ActivitySignVO activitySignVO);
+}
--
Gitblit v1.7.1