From ada9d2e3f734582a0d9ae8c00a936d8c8ed669d7 Mon Sep 17 00:00:00 2001 From: huanghongfa <18228131219@163.com> Date: 星期五, 15 一月 2021 13:51:44 +0800 Subject: [PATCH] 微心愿详情bug --- 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..49f93a6 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() != ""'>" + - "d.title = #{comActDynVO.title} \n" + + "AND d.title = #{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() != ""'>" + + "<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(HOUR, SYSDATE(), publish_at)<=0 ") + int timedTaskDynStatus(); } -- Gitblit v1.7.1