From 8555f974846ca5b4f4734f52b51e39cd4502df44 Mon Sep 17 00:00:00 2001 From: DESKTOP-71BH0QO\L、ming <172680469@qq.com> Date: 星期五, 02 四月 2021 15:46:30 +0800 Subject: [PATCH] fix:修改bug --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDynDAO.java | 13 ++++++++++--- 1 files changed, 10 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..0042cb5 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,10 @@ "d.title,\n" + "COUNT(u.id)readNum,\n" + "d.`status`,\n" + + "d.`content`,\n" + + "d.`cover`,\n" + + "d.`type`,\n" + + "d.`cover_mode`,\n" + "d.is_topping,\n" + "d.publish_at,\n" + "d.create_at\n" + @@ -33,7 +38,7 @@ "WHERE\n" + "d.community_id=#{comActDynVO.communityId}\n" + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" + - "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 +46,14 @@ "<if test='comActDynVO.status != null '>" + "AND d.`status` = #{comActDynVO.status} \n" + " </if> " + - "<if test='comActDynVO.publishAtBegin != null and comActDynVO.publishAtBegin.trim() != ""'>" + + "<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