From b3c6911c1e78563dc04998dd7bfb510130a9fcec Mon Sep 17 00:00:00 2001
From: huanghongfa <18228131219@163.com>
Date: 星期一, 01 二月 2021 16:37:52 +0800
Subject: [PATCH] auth

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDynDAO.java |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDynDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDynDAO.java
index 9bdbf05..81eb873 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDynDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDynDAO.java
@@ -9,6 +9,7 @@
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
 
 /**
  * @program: springcloud_k8s_panzhihuazhihuishequ
@@ -24,6 +25,8 @@
             "d.title,\n" +
             "COUNT(u.id)readNum,\n" +
             "d.`status`,\n" +
+            "d.`content`,\n" +
+            "d.`cover`,\n" +
             "d.is_topping,\n" +
             "d.publish_at,\n" +
             "d.create_at\n" +
@@ -33,7 +36,7 @@
             "WHERE\n" +
             "d.community_id=#{comActDynVO.communityId}\n" +
             "<if test='comActDynVO.title != null and comActDynVO.title.trim() != &quot;&quot;'>" +
-            "d.title = #{comActDynVO.title} \n" +
+            "AND d.title like concat(#{comActDynVO.title},'%')  \n" +
             " </if> " +
             "<if test='comActDynVO.isTopping != null '>" +
             "AND d.is_topping = #{comActDynVO.isTopping} \n" +
@@ -41,12 +44,14 @@
             "<if test='comActDynVO.status != null '>" +
             "AND d.`status` = #{comActDynVO.status} \n" +
             " </if> " +
-            "<if test='comActDynVO.publishAtBegin != null and comActDynVO.publishAtBegin.trim() != &quot;&quot;'>" +
+            "<if test='comActDynVO.publishAtBegin != null '>" +
             "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} \n" +
             "AND #{comActDynVO.publishAtEnd}" +
             " </if> " +
             " group by d.id  "+
-            " order by d.is_topping , d.create_at desc "+
+            " order by d.is_topping desc, d.create_at desc "+
             "</script>")
     IPage<ComActDynVO> pageDynamic(Page page, @Param("comActDynVO") ComActDynVO comActDynVO);
+    @Update("update com_act_dyn set `status`=1 WHERE `status`=0 and TIMESTAMPDIFF(MINUTE, SYSDATE(), publish_at)<=0 ")
+    int timedTaskDynStatus();
 }

--
Gitblit v1.7.1