From 02f18587bd8860b305e2c688e20465be166bb48c Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期四, 22 七月 2021 15:14:03 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/test' into test

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
index ab944a4..66a32b5 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
@@ -44,11 +44,16 @@
             "canc.type," +
             "su.nick_name as name," +
             "su.community_id," +
+            "canct.name as topicName," +
             "su.image_url as headUrl " +
             " FROM " +
             " com_act_neighbor_circle AS canc" +
-            " left join sys_user as su on su.user_id = canc.release_id" +
+            " left join sys_user as su on su.user_id = canc.release_id " +
+            " left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id " +
             " where canc.status = 2 and canc.community_id = #{neighborCircleAppDTO.communityId} " +
+            "<if test='neighborCircleAppDTO.topicId != null '>" +
+            " and canc.topic_id = #{neighborCircleAppDTO.topicId}  " +
+            " </if> " +
             "<if test='neighborCircleAppDTO.type != null and neighborCircleAppDTO.type == 1'>" +
             " order by (canc.last_views_num + canc.last_comment_num + canc.last_fabulous_num) desc " +
             " </if> " +
@@ -63,26 +68,34 @@
 
     @Select("<script> " +
             "select canc.id,su.nick_name as name,su.image_url as headUrl,canc.release_content " +
-            ",canc.release_images,canc.comment_num,canc.fabulous_num,canc.forward_num,canc.views_num " +
+            ",canc.release_images,canc.comment_num,canc.fabulous_num,canc.forward_num,canc.views_num,canct.name as topicName " +
             ",canc.is_boutique,canc.create_at,canc.reply_at,su.community_id,canc.type from com_act_neighbor_circle as canc " +
-            " left join sys_user as su on su.user_id = canc.release_id where id = #{circleId}"+
+            " left join sys_user as su on su.user_id = canc.release_id  "+
+            " left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id where canc.id = #{circleId}" +
             " </script>")
     ComActNeighborCircleDetailAppVO neighborDetailByApp(@Param("circleId") Long circleId);
     @Select("<script> \n"+
             "SELECT\n" +
             "nc.*,\n" +
-            "u.`nick_name` AS releaseName,u.`type` as userType\n" +
+            "u.`nick_name` AS releaseName,u.image_url,canct.`name` as topicName ,u.`type` as userType\n" +
             ",u.name as communityName\n" +
             "FROM\n" +
             "com_act_neighbor_circle nc\n" +
             "LEFT JOIN sys_user u ON nc.release_id = u.user_id \n" +
+            "LEFT JOIN com_act_neighbor_circle_topic as canct ON canct.id = nc.topic_id \n" +
             "<where>"+
             "nc.community_id = #{neighborCircleAdminDTO.communityId}  \n"+
             "<if test='neighborCircleAdminDTO.releaseContent != null and neighborCircleAdminDTO.releaseContent != &quot;&quot;'>" +
             "and nc.release_content like concat('%',#{neighborCircleAdminDTO.releaseContent},'%')  \n" +
             " </if> " +
+            "<if test='neighborCircleAdminDTO.topicName != null and neighborCircleAdminDTO.topicName != &quot;&quot;'>" +
+            "and canct.`name` = #{neighborCircleAdminDTO.topicName}  " +
+            " </if> " +
             "<if test='neighborCircleAdminDTO.startAt != null and neighborCircleAdminDTO.endAt !=null '>" +
             "and nc.create_at between #{neighborCircleAdminDTO.startAt} and #{neighborCircleAdminDTO.endAt}  \n" +
+            " </if> " +
+            "<if test='neighborCircleAdminDTO.status != null '>" +
+            "and nc.status = #{neighborCircleAdminDTO.status}  \n" +
             " </if> " +
             "</where>"+
             "order by " +
@@ -95,10 +108,11 @@
     AdministratorsUserVO selectUserByUserId(@Param("userId") Long userId);
 
     @Select("<script> " +
-            "select canc.id,canc.release_content,canc.release_images,canc.status,canc.create_at" +
+            "select canc.id,canc.release_content,canc.release_images,canc.status,canc.create_at,canct.name as topicName" +
             ",canc.comment_num,canc.fabulous_num,canc.forward_num,canc.views_num,canc.refuse_reason,su.nick_name as name,su.image_url as headUrl " +
             " from com_act_neighbor_circle as canc " +
             " left join sys_user as su on su.user_id = canc.release_id " +
+            " left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id " +
             " where canc.release_id = #{userId} and canc.status != 3 order by create_at desc" +
             " </script>")
     IPage<ComActNeighborCircleAppVO> neighborExamineByApp(Page page,@Param("userId") Long userId);
@@ -133,7 +147,7 @@
             "UNION ALL " +
             "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND STATUS = 2 " +
             "UNION ALL " +
-            "SELECT COUNT( e.id ) AS num,'网格事件' AS name FROM `event` as e left join event_grid_data as egd on egd.id = e.grid_id WHERE egd.grid_community_id = #{communityId} AND e.event_process_status = 2" +
+            "SELECT COUNT( e.id ) AS num,'网格事件' AS name FROM `event` as e left join event_grid_data as egd on egd.id = e.grid_id WHERE egd.grid_community_id = #{communityId} AND e.event_process_status = 2 " +
             "UNION ALL " +
             "SELECT COUNT(id) as num,'社区活动' as name FROM com_act_activity WHERE community_id = #{communityId} AND STATUS = 5 ")
     List<PieElementVO> countAllCompletedWorkByCommunityId(@Param("communityId")Long communityId);

--
Gitblit v1.7.1