| | |
| | | "left join com_act_act_sign s on a.id=s.activity_id \n"+ |
| | | " where a.community_id=#{comActActivityVO.communityId}" + |
| | | "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName.trim() != ""'>" + |
| | | " and a.activity_name = #{comActActivityVO.activityName} \n" + |
| | | " and a.activity_name like concat(#{comActActivityVO.activityName},'%') \n" + |
| | | " </if> " + |
| | | "<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> " + |
| | | " group by a.id "+ |
| | | " order by a.publish_at desc "+ |
| | | "</script>") |
| | | IPage<ComActActivityVO> pageActivity( Page page, @Param("comActActivityVO") ComActActivityVO comActActivityVO); |
| | | |
| | |
| | | "s.create_at DESC") |
| | | IPage<ComActActivityVO> pageMyActivity(Page page, @Param("comActActivityVO") ComActActivityVO comActActivityVO); |
| | | |
| | | @Select("select t.activity_name,t.id,t.end_at,t.cover,t.status from com_act_act_sign s join sys_user u on s.user_id=u.user_id and u.phone=#{phone} and s.is_volunteer=1 " + |
| | | @Select("select " + |
| | | "t.activity_name," + |
| | | "t.id," + |
| | | "t.end_at," + |
| | | "t.begin_at," + |
| | | "t.cover," + |
| | | "t.status " + |
| | | "from com_act_act_sign s " + |
| | | "join sys_user u on s.user_id=u.user_id and u.phone=#{phone} and s.is_volunteer=1 " + |
| | | "join com_act_activity t on s.activity_id=t.id and t.status=5") |
| | | List<ComActActivityVO> listActivityByPhone(String phone); |
| | | @Select("select t.id from (\n" + |
| | |
| | | "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(); |
| | | |
| | |
| | | "</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(); |
| | | } |