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/ComActActivityDAO.java | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java index f1b6adc..bd91cbc 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java @@ -59,6 +59,9 @@ "<if test='comActActivityVO.status != null and comActActivityVO.status !=0'>" + "AND a.`status` = #{comActActivityVO.status} \n" + " </if> " + + "<if test='comActActivityVO.isApplets != null and comActActivityVO.isApplets ==1'>" + + "AND a.`status` != 1 \n" + + " </if> " + "<if test='comActActivityVO.beginAt != null '>" + "AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} \n" + " </if> " + @@ -106,7 +109,7 @@ "com_act_activity a \n" + "LEFT JOIN com_act_act_sign s on a.id=s.activity_id \n" + "WHERE\n" + - "a.`status` in(3,4) and DATEDIFF(SYSDATE(),a.sign_up_end)>=0\n" + + "a.`status` in(3,4) and TIMESTAMPDIFF(HOUR,SYSDATE(),a.sign_up_end)<=0\n" + "GROUP BY a.id)t WHERE t.usernum<participant_min or t.volunteernum<volunteer_min") List<Long> selectTimedTaskActActivity(); @@ -118,12 +121,12 @@ "</script>") int updateIdBatch(@Param("longs") List<Long> longs); - @Update("update com_act_activity set `status`=2 where `status`=1 and DATEDIFF(SYSDATE(),publish_at)>=0") + @Update("update com_act_activity set `status`=2 where `status`=1 and TIMESTAMPDIFF(HOUR,SYSDATE(),publish_at)<=0") int updateStatusToNotBegin(); - @Update("update com_act_activity set `status`=3 where `status`=2 and DATEDIFF(SYSDATE(),sign_up_begin)>=0") + @Update("update com_act_activity set `status`=3 where `status`=2 and TIMESTAMPDIFF(HOUR,SYSDATE(),sign_up_begin)<=0") int updateStatusToBeginSign(); - @Update("update com_act_activity set `status`=(if(DATEDIFF(SYSDATE(),end_at)>=0,5,4)) where `status`=3 and DATEDIFF(SYSDATE(),begin_at)>=0") + @Update("update com_act_activity set `status`=(if(DATEDIFF(SYSDATE(),end_at)>=0,5,4)) where `status`=3 and TIMESTAMPDIFF(HOUR,SYSDATE(),begin_at)<=0") int updateStatusToBeginActiveOrEnd(); } -- Gitblit v1.7.1