From 7bfa6a85ad6a6c537b0f7ddb9f6a8795c8e8c866 Mon Sep 17 00:00:00 2001 From: puhanshu <a9236326> Date: 星期四, 09 六月 2022 16:44:24 +0800 Subject: [PATCH] 五社&社区企业&人大代表 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDynDAO.java | 60 ++++++++++++++++++++++++++++++------------------------------ 1 files changed, 30 insertions(+), 30 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 9a37d31..306af20 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 @@ -30,41 +30,41 @@ **/ @Mapper public interface ComActDynDAO extends BaseMapper<ComActDynDO> { - @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.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>") +// @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.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); @Select("SELECT " + " count( cad.id ) AS dynTotal, " -- Gitblit v1.7.1