CeDo
2021-05-07 de91c84954157bb9f8b6d938cbe0b1b51fb6e65d
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComBpActivityDAO.java
@@ -50,7 +50,7 @@
            "WHERE\n" +
            "m.member_id = #{id} \n" +
            "<if test='name != null and name.trim() != &quot;&quot;'>" +
            "AND a.`name` = #{name} \n" +
            "AND a.`name` like concat (#{name},'%')  \n" +
            " </if> " +
            "<if test='releaseTimeBegin != null '>" +
            "AND a.create_at BETWEEN #{releaseTimeBegin} \n" +
@@ -81,6 +81,7 @@
            "com_pb_activity a\n" +
            "left join sys_user u on a.create_by=u.user_id \n" +
            "where a.community_id=#{partyBuildingActivityVO.communityId}\n" +
            " and a.`status` not in(5,6) \n"+
            "<if test='partyBuildingActivityVO.name != null and partyBuildingActivityVO.name.trim() != &quot;&quot;'>" +
            "and a.name = #{partyBuildingActivityVO.name} \n" +
            " </if> " +
@@ -111,7 +112,7 @@
            "FROM\n" +
            "com_pb_activity a\n" +
            "LEFT JOIN com_pb_activity_member m ON a.id = m.activity_id\n" +
            "WHERE a.`status` in (3,4) and TIMESTAMPDIFF(HOUR,SYSDATE(),a.enroll_time_end)<=0\n" +
            "WHERE a.`status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),a.enroll_time_end)<=0\n" +
            "GROUP BY a.id)t where t.num<t.participation_lowest_num")
    List<Long> selectTimedTaskPartyBuildingActivity();
@@ -132,14 +133,22 @@
            "</script>")
    int updateBatchIds(@Param("ids") List<Long> ids);
    @Update("update com_pb_activity set status=2 where `status`=1 and TIMESTAMPDIFF(HOUR,SYSDATE(),release_time)<=0")
    @Update("update com_pb_activity set status=2 where `status`=1 and TIMESTAMPDIFF(MINUTE,SYSDATE(),release_time)<=0")
    int updateStatusToNotBegin();
    @Update("update com_pb_activity set status=3 where `status`=2 and TIMESTAMPDIFF(HOUR,SYSDATE(),enroll_time_begin)<=0")
    @Update("update com_pb_activity set status=3 where `status`=2 and TIMESTAMPDIFF(MINUTE,SYSDATE(),enroll_time_begin)<=0")
    int updateStatusToSign();
    @Update("update com_pb_activity set status=(if(TIMESTAMPDIFF(HOUR,SYSDATE(),activity_time_end)<=0,5,4)) where `status`=3 and TIMESTAMPDIFF(HOUR,SYSDATE(),activity_time_begin)<=0")
    @Update("update com_pb_activity set status=5 where `status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),enroll_time_end)<=0")
    int updateStatusToActiveOrEnd();
    @Select("select type,name from sys_user where user_id=#{createBy}")
    LoginUserInfoVO selectUserInfoByUserId(Long createBy);
    /**
     * 根据社区id查询社区名称
     * @param communityId   社区id
     * @return  社区名字
     */
    @Select("select name from com_act where community_id=#{communityId}")
    String selectCommunityNameByCommunityId(Long communityId);
}