huanghongfa
2021-01-25 1bf41e33b3bd89bb407d92e5362843cedf725396
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
@@ -121,7 +121,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 TIMESTAMPDIFF(HOUR,SYSDATE(),a.sign_up_end)<=0\n" +
            "a.`status` in(3,4) and TIMESTAMPDIFF(MINUTE,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();
@@ -133,13 +133,13 @@
        "</script>")
    int updateIdBatch(@Param("longs") List<Long> longs);
    @Update("update com_act_activity set `status`=2 where `status`=1 and TIMESTAMPDIFF(HOUR,SYSDATE(),publish_at)<=0")
    @Update("update com_act_activity set `status`=2 where `status`=1 and TIMESTAMPDIFF(MINUTE,SYSDATE(),publish_at)<=0")
    int updateStatusToNotBegin();
    @Update("update com_act_activity set `status`=3 where `status`=2 and TIMESTAMPDIFF(HOUR,SYSDATE(),sign_up_begin)<=0")
    @Update("update com_act_activity set `status`=3 where `status`=2 and TIMESTAMPDIFF(MINUTE,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 TIMESTAMPDIFF(HOUR,SYSDATE(),begin_at)<=0")
    @Update("update com_act_activity set `status`=(if(DATEDIFF(SYSDATE(),end_at)>=0,5,4)) where `status`=3 and TIMESTAMPDIFF(MINUTE,SYSDATE(),begin_at)<=0")
    int updateStatusToBeginActiveOrEnd();
    @Select("<script> " +
            "select t.* from (\n" +
@@ -212,6 +212,6 @@
            "</script>")
    IPage<ComActActivityVO> pageActivityCommunityBack(Page page, @Param("comActActivityVO") ComActActivityVO comActActivityVO);
    @Update("update com_act_activity set `status`=4 where `status`=3 and TIMESTAMPDIFF(HOUR,SYSDATE(),sign_up_end)<=0")
    @Update("update com_act_activity set `status`=4 where `status`=3 and TIMESTAMPDIFF(MINUTE,SYSDATE(),sign_up_end)<=0")
    int updateStatusToBeginAfterSingEnd();
}