| | |
| | | "d.publish_at,\n" + |
| | | "d.content,\n" + |
| | | "d.cover,\n" + |
| | | "d.cover_mode,\n" + |
| | | "d.dyn_type,\n" + |
| | | "d.create_at \n" + |
| | | "FROM\n" + |
| | | "com_pb_dyn d\n" + |
| | |
| | | "where d.type=#{partyBuildingComPbDynVO.type} \n" + |
| | | "<if test='partyBuildingComPbDynVO.communityId != null and partyBuildingComPbDynVO.communityId != 0'>" + |
| | | "and d.community_id = #{partyBuildingComPbDynVO.communityId} \n" + |
| | | " </if> " + |
| | | "<if test='partyBuildingComPbDynVO.dynType != null and partyBuildingComPbDynVO.dynType != 0'>" + |
| | | "and d.dyn_type = #{partyBuildingComPbDynVO.dynType} \n" + |
| | | " </if> " + |
| | | "<if test='partyBuildingComPbDynVO.title != null and partyBuildingComPbDynVO.title.trim() != ""'>" + |
| | | "and d.title like concat(#{partyBuildingComPbDynVO.title},'%') \n" + |
| | |
| | | " </if> " + |
| | | "GROUP BY\n" + |
| | | "d.id\n" + |
| | | "ORDER BY d.create_at desc"+ |
| | | "ORDER BY d.publish_at desc"+ |
| | | "</script>") |
| | | IPage<PartyBuildingComPbDynVO> pageYnamic(Page page, @Param("partyBuildingComPbDynVO") PartyBuildingComPbDynVO partyBuildingComPbDynVO); |
| | | @Update("update com_pb_dyn set `status`=2 WHERE `status`=1 and TIMESTAMPDIFF(HOUR,SYSDATE(),publish_at)<=0") |
| | | @Update("update com_pb_dyn set `status`=2 WHERE `status`=1 and TIMESTAMPDIFF(MINUTE,SYSDATE(),publish_at)<=0") |
| | | int timedTaskPartyBuildingStatus(); |
| | | @Select("<script> " + |
| | | "SELECT\n" + |
| | | " distinct COUNT( u.id ) readingVolume,\n" + |
| | | " d.community_id, d.content, d.cover, d.cover_mode, d.create_at, d.create_by, d.dyn_type, d.id, d.publish_at, d.status, d.title, d.type, \n" + |
| | | " act.name as createByName " + |
| | | "FROM\n" + |
| | | "com_pb_dyn d LEFT JOIN com_act act ON d.community_id = act.community_id \n" + |
| | | "LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id " + |
| | | "where d.id = #{id} " + |
| | | " group by d.id " + |
| | | "</script>") |
| | | PartyBuildingComPbDynVO selectVoById(@Param("id")Long id); |
| | | } |