From 7ea43dac46900dab7535bdd3ec957b45e43b5270 Mon Sep 17 00:00:00 2001
From: DESKTOP-71BH0QO\L、ming <172680469@qq.com>
Date: 星期三, 28 四月 2021 17:38:07 +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 |   40 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 39 insertions(+), 1 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 0928d7f..5d1c0da 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
@@ -8,6 +8,7 @@
 import com.panzhihua.common.model.vos.R;
 import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO;
 import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAppVO;
+import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleDetailAppVO;
 import com.panzhihua.common.model.vos.user.AdministratorsUserVO;
 import com.panzhihua.service_community.model.dos.ComActNeighborCircleDO;
 import org.apache.ibatis.annotations.Mapper;
@@ -22,9 +23,46 @@
 @Mapper
 public interface ComActNeighborCircleDAO extends BaseMapper<ComActNeighborCircleDO> {
 
-    @Select("")
+    @Select("<script> " +
+            "SELECT " +
+            "canc.id," +
+            "canc.release_content," +
+            "canc.release_images," +
+            "canc.comment_num," +
+            "canc.fabulous_num," +
+            "canc.forward_num," +
+            "canc.views_num," +
+            "canc.is_boutique," +
+            "canc.create_at," +
+            "canc.reply_at," +
+            "canc.last_comment_num," +
+            "canc.last_fabulous_num," +
+            "canc.last_views_num," +
+            "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" +
+            " where canc.status = 2 and canc.community_id = #{communityId} " +
+            "<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> " +
+            "<if test='neighborCircleAppDTO.type != null and neighborCircleAppDTO.type == 2'>" +
+            " order by canc.reply_at desc,canc.create_at desc " +
+            " </if> " +
+            "<if test='neighborCircleAppDTO.type != null and neighborCircleAppDTO.type == 3'>" +
+            " order by (canc.views_num + canc.comment_num + canc.fabulous_num) desc " +
+            " </if> " +
+            " </script>")
     IPage<ComActNeighborCircleAppVO> pageNeighborByApp(Page page, @Param("neighborCircleAppDTO") ComActNeighborCircleAppDTO neighborCircleAppDTO);
 
+    @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.is_boutique,canc.create_at,canc.reply_at from com_act_neighbor_circle as canc " +
+            " left join sys_user as su on su.user_id = canc.release_id where id = #{circleId}"+
+            " </script>")
+    ComActNeighborCircleDetailAppVO neighborDetailByApp(@Param("circleId") Long circleId);
     @Select("<script> \n"+
             "SELECT\n" +
             "nc.*,\n" +

--
Gitblit v1.7.1