| | |
| | | // " </where>" + |
| | | // "</script>") |
| | | |
| | | @Select("<script> " + "SELECT\n" + "d.id,\n" + "d.title, d.jump_url, d.jump_type,\n" + "COUNT( u.id ) readingVolume,\n" + "d.`status`,\n" |
| | | + "d.publish_at,\n" + "d.content,\n" + "d.cover,\n" + "d.cover_mode,\n" + "d.dyn_type,\n" + "d.create_at,t.name as communityName,d.policy_type \n" |
| | | + "FROM\n" + "com_pb_dyn d\n" + "LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id left join com_act t on d.community_id = t.community_id\n" |
| | | + "where d.type=#{partyBuildingComPbDynVO.type} \n" |
| | | + "<if test='partyBuildingComPbDynVO.communityIds != null and partyBuildingComPbDynVO.communityIds > 0 '>" + " and d.community_id in " |
| | | + "<foreach item=\"item\" collection=\"partyBuildingComPbDynVO.communityIds\" separator=\",\" open=\"(\" close=\")\" index=\"\"> \n" |
| | | + "#{item}\n" + "</foreach>\n" + " </if> " |
| | | + "<if test='partyBuildingComPbDynVO.dynType != null and partyBuildingComPbDynVO.dynType != 0'>" |
| | | + "and d.dyn_type = #{partyBuildingComPbDynVO.dynType} \n" + " </if> " |
| | | + "<if test='partyBuildingComPbDynVO.policyType != null and partyBuildingComPbDynVO.policyType != 0'>" |
| | | + "and d.policy_type = #{partyBuildingComPbDynVO.policyType} \n" + " </if> " |
| | | + "<if test='partyBuildingComPbDynVO.policyType == 0'>" |
| | | + "and d.policy_type is not null \n" + " </if> " |
| | | + "<if test='partyBuildingComPbDynVO.title != null and partyBuildingComPbDynVO.title.trim() != ""'>" |
| | | + "and d.title like concat(#{partyBuildingComPbDynVO.title},'%') \n" + " </if> " |
| | | + "<if test='partyBuildingComPbDynVO.status != null and partyBuildingComPbDynVO.status != 0'>" |
| | | + "AND d.`status` = #{partyBuildingComPbDynVO.status} \n" + " </if> " |
| | | + "<if test='partyBuildingComPbDynVO.publishAtBegin != null '>" |
| | | + "AND d.publish_at BETWEEN #{partyBuildingComPbDynVO.publishAtBegin} \n" |
| | | + "AND #{partyBuildingComPbDynVO.publishAtEnd} \n" + " </if> " + "GROUP BY\n" + "d.id\n" |
| | | + "ORDER BY d.publish_at <if test='partyBuildingComPbDynVO.sort !=null and partyBuildingComPbDynVO.sort !=""'> asc </if> <if test='partyBuildingComPbDynVO.sort ==null'> desc</if>" + "</script>") |
| | | IPage<PartyBuildingComPbDynVO> pageYnamic(Page page, |
| | | @Param("partyBuildingComPbDynVO") PartyBuildingComPbDynVO partyBuildingComPbDynVO); |
| | | |