From 70d2a5d0f9c6951b2d4cac954041ed73582ff7eb Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期一, 09 六月 2025 11:54:00 +0800 Subject: [PATCH] 6.9新增登录失败冻结逻辑 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDynDAO.java | 134 +++++++++++++++++++++++++++++++++----------- 1 files changed, 100 insertions(+), 34 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 5d322c7..3a957b5 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 @@ -1,7 +1,14 @@ package com.panzhihua.service_community.dao; +import java.util.List; import java.util.Map; +import com.panzhihua.common.model.dtos.PageBaseDTO; +import com.panzhihua.common.model.vos.community.ComActDiscussVO; +import com.panzhihua.common.model.vos.community.ComSwPatrolRecordVO; +import com.panzhihua.common.model.vos.community.StatisticsCommVO; +import com.panzhihua.common.model.vos.community.bigscreen.BigScreenPartyBuildIngStatisticsInfo; +import com.panzhihua.common.model.vos.partybuilding.PartyBuildingActivityVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -23,54 +30,113 @@ **/ @Mapper public interface ComActDynDAO extends BaseMapper<ComActDynDO> { - @Select("<script> " + "SELECT " + "d.id, " + "d.title, " + "COUNT(u.id)readNum, " + "d.`status`, " - + "d.`content`, " + "d.`cover`, " + "d.`type`, " + "d.`cover_mode`, " + "d.is_topping, " + "d.publish_at, " - + "d.create_at, " + "cadt.`name` as typeName, " + "cadt.color as typeColor, " + "ca.name as communityName " - + "FROM " + "com_act_dyn d " + "LEFT JOIN com_act_dyn_user u ON d.id = u.dyn_id " - + "LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type " - + "LEFT JOIN com_act ca ON d.community_id = ca.community_id " + "WHERE 1=1 " - + "<if test='comActDynVO.choice == 0 '>" + "and d.community_id=#{comActDynVO.communityId} " + " </if> " - + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" - + "AND d.title like concat(#{comActDynVO.title},'%') " + " </if> " - + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping} " + " </if> " - + "<if test='comActDynVO.status != null '>" + "AND d.`status` = #{comActDynVO.status} " + " </if> " - + "<if test='comActDynVO.publishAtBegin != null '>" + "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} " - + "AND #{comActDynVO.publishAtEnd}" + " </if> " + " group by d.id " - + " order by d.is_topping desc, d.create_at desc " + "</script>") +// @Select("<script> " + "SELECT " + "d.id, " + "d.title, " + "IFNULL(u.readNum,0) readNum, " + "d.`status`, " +// + "d.`content`, " + "d.`cover`, " + "d.`type`, " + "d.`cover_mode`, d.jump_url,d.jump_type, " + "d.is_topping, " + "d.publish_at, " +// + "d.create_at, " + "cadt.`name` as typeName, " + "cadt.color as typeColor, " + "ca.name as communityName " +// + "FROM " + "com_act_dyn d " + "LEFT JOIN ( select dyn_id,count(id) as readNum from com_act_dyn_user GROUP BY dyn_id ) u ON d.id = u.dyn_id " +// + "LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type " +// + "LEFT JOIN com_act ca ON d.community_id = ca.community_id " + "WHERE 1=1 " +// + "<if test='comActDynVO.category != null '>" + "and d.category = #{comActDynVO.category} " + " </if> " +// + "<if test='comActDynVO.choice == 0 '>" + "and d.community_id = ${comActDynVO.communityId} " + " </if> " +// + "<if test='comActDynVO.areaCode !=null '>" + "and ca.area_code = ${comActDynVO.areaCode} " + " </if> " +// + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" +// + "AND d.title like concat(#{comActDynVO.title},'%') " + " </if> " +// + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping} " + " </if> " +// + "<if test='comActDynVO.status != null '>" + "AND d.`status` = #{comActDynVO.status} " + " </if> " +// + "<if test='comActDynVO.publishAtBegin != null '>" + "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} " +// + "AND #{comActDynVO.publishAtEnd}" + " </if> " + " group by d.id " +// + " 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(MINUTE, SYSDATE(), publish_at)<=0 ") int timedTaskDynStatus(); - @Select("<script> " + "SELECT " + "d.id, " + "d.title, " + "COUNT(u.id)readNum, " + "d.`status`, " - + "d.`content`, " + "d.`cover`, " + "d.`type`, " + "d.`cover_mode`, " + "d.is_topping, " + "d.publish_at, " - + "d.create_at, " + "cadt.`name` as typeName, " + "ca.name as communityName " + "FROM " + "com_act_dyn d " - + "LEFT JOIN com_act_dyn_user u ON d.id = u.dyn_id " - + "LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type " - + "LEFT JOIN com_act ca ON d.community_id = ca.community_id " + "WHERE " - + "d.community_id=#{comActDynVO.communityId} " - + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" - + "AND d.title like concat(#{comActDynVO.title},'%') " + " </if> " - + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping} " + " </if> " - + "<if test='comActDynVO.status != null '>" + "AND d.`status` = #{comActDynVO.status} " + " </if> " - + "<if test='comActDynVO.type != null '>" + "AND d.type = #{comActDynVO.type} " + " </if> " - + "<if test='comActDynVO.publishAtBegin != null '>" + "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} " - + "AND #{comActDynVO.publishAtEnd}" + " </if> " + " group by d.id " - + " order by d.is_topping desc, d.create_at desc " + "</script>") +// @Select("<script> " + "SELECT " + "d.id, " + "d.title, " + "COUNT(u.id)readNum, " + "d.`status`, " +// + "d.`content`, " + "d.`cover`, " + "d.`type`, " + "d.`cover_mode`, " + "d.is_topping, " + "d.publish_at, " +// + "d.create_at, " + "cadt.`name` as typeName, " + "ca.name as communityName " + "FROM " + "com_act_dyn d " +// + "LEFT JOIN com_act_dyn_user u ON d.id = u.dyn_id " +// + "LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type " +// + "LEFT JOIN com_act ca ON d.community_id = ca.community_id " + "WHERE " +// + "d.community_id = ${comActDynVO.communityId} " +// + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" +// + "AND d.title like concat(#{comActDynVO.title},'%') " + " </if> " +// + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping} " + " </if> " +// + "<if test='comActDynVO.status != null '>" + "AND d.`status` = #{comActDynVO.status} " + " </if> " +// + "<if test='comActDynVO.type != null '>" + "AND d.type = #{comActDynVO.type} " + " </if> " +// + "<if test='comActDynVO.publishAtBegin != null '>" + "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} " +// + "AND #{comActDynVO.publishAtEnd}" + " </if> " + " group by d.id " +// + " order by d.is_topping desc, d.create_at desc " + "</script>") IPage<ComActDynVO> pageDynamicByAdmin(Page page, @Param("comActDynVO") ComActDynVO comActDynVO); + + String getContent(@Param("id") String id); + + int getReadNum(@Param("dynId") String dynId); + + @Select("SELECT " + " count( cad.id ) AS dynTotal, " - + " (select count(id) from com_act_dyn where community_id = #{communityId} and create_at LIKE CONCAT(#{nowDate},'%')) as currentNum " - + "FROM " + " com_act_dyn AS cad " + "WHERE " + " community_id = #{communityId}") + + " (select count(id) from com_act_dyn where community_id = ${communityId} and create_at LIKE CONCAT(#{nowDate},'%')) as currentNum " + + "FROM " + " com_act_dyn AS cad " + "WHERE " + " community_id = ${communityId}") Map<String, Long> countByCommunityId(@Param("communityId") Long communityId, @Param("nowDate") String nowDate); - @Select("select create_at as startTime,(select create_at from com_act_dyn where community_id = #{communityId} order by create_at desc LIMIT 1 ) as endTime from com_act_dyn where community_id = #{communityId} order by create_at asc LIMIT 1") + @Select("select create_at as startTime,(select create_at from com_act_dyn where community_id = ${communityId} order by create_at desc LIMIT 1 ) as endTime from com_act_dyn where community_id = ${communityId} order by create_at asc LIMIT 1") DateScreenVO countByAvgCommunityId(@Param("communityId") Long communityId); @Select("SELECT " - + "(SELECT COUNT(id) FROM com_act_dyn WHERE community_id = #{communityId} AND create_at < #{end}) AS dynTotal, " - + "(SELECT COUNT(id) FROM com_act_dyn WHERE community_id = #{communityId} AND #{start} < create_at AND create_at < #{end}) AS dynAdd " + + "(SELECT COUNT(id) FROM com_act_dyn WHERE community_id = ${communityId} AND create_at < #{end}) AS dynTotal, " + + "(SELECT COUNT(id) FROM com_act_dyn WHERE community_id = ${communityId} AND #{start} < create_at AND create_at < #{end}) AS dynAdd " + " FROM DUAL") DynamicWorkVO countByTime(@Param("start") String start, @Param("end") String end, @Param("communityId") Long communityId); + + List<StatisticsCommVO> getIndexDynBaseData(@Param("communityId") Long communityId); + + List<StatisticsCommVO> getDynAddPolylineData(@Param("communityId") Long communityId); + + StatisticsCommVO getDynTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); + + IPage<ComActDynVO> indexDynList(@Param("page") Page page, @Param("pageBaseDTO") PageBaseDTO pageBaseDTO); + + /** + * 获取党建引领基础数据 + * @param communityId + * @return + */ + BigScreenPartyBuildIngStatisticsInfo getPartyBuildIngBaseData(@Param("communityId") Long communityId); + + /** + * 分页获取党员活动 + * @param pageBaseDTO + * @return + */ + IPage<PartyBuildingActivityVO> pagePartyBuildIngAct(@Param("page") Page page, @Param("pageBaseDTO") PageBaseDTO pageBaseDTO); + + /** + * 分页获取议事投票数据 + * @param page + * @param pageBaseDTO + * @return + */ + IPage<ComActDiscussVO> pagePartyBuildIngDiscuss(@Param("page") Page page, @Param("pageBaseDTO") PageBaseDTO pageBaseDTO); + + /** + * 获取居民宣传记录 + * @param communityId + * @param pageSize + * @return + */ + List<ComActDynVO> getPartyBuildIngDynRecord(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize); + + /** + * 获取巡查记录 + * @param communityId + * @param pageSize + * @return + */ + List<ComSwPatrolRecordVO> getPartyBuildIngPatrolRecord(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize); + + + + String getTypeId(@Param("communityId") String communityId, @Param("name") String name); + } -- Gitblit v1.7.1