| | |
| | | </sql> |
| | | |
| | | |
| | | <select id="findByPage" resultType="com.panzhihua.common.model.vos.grid.EventGridDataVO" |
| | | <select id="findByPage" resultType="com.panzhihua.common.model.vos.grid.EventGridAdminVO" |
| | | parameterType="com.panzhihua.common.model.dtos.grid.PageEventGridDataDTO"> |
| | | SELECT <include refid="columns" /> |
| | | FROM event_grid_data |
| | | SELECT DISTINCT |
| | | egd.id, |
| | | egd.grid_name, |
| | | egd.remarks, |
| | | egd.area, |
| | | egd.line_color, |
| | | egd.line_broadband, |
| | | egd.fill_color, |
| | | egd.data, |
| | | egd.create_at, |
| | | egd.create_by, |
| | | ca.`name` AS communityName |
| | | FROM |
| | | event_grid_data AS egd |
| | | LEFT JOIN com_act AS ca ON ca.community_id = egd.grid_community_id |
| | | LEFT JOIN event_grid_member_relation AS egmr ON egmr.grid_id = egd.id |
| | | left join sys_user as su on su.user_id = egmr.grid_member_id |
| | | <where> |
| | | <if test="pageEventGridDataDTO.id!=null"> |
| | | AND id = #{pageEventGridDataDTO.id} |
| | | <if test="pageEventGridDataDTO.gridStreetId!=null"> |
| | | AND egd.grid_street_id = #{pageEventGridDataDTO.gridStreetId} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.type!=null"> |
| | | AND type = #{pageEventGridDataDTO.type} |
| | | <if test="pageEventGridDataDTO.gridCommunityId!=null"> |
| | | AND egd.grid_community_id = #{pageEventGridDataDTO.gridCommunityId} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.zoneId!=null"> |
| | | AND zone_id = #{pageEventGridDataDTO.zoneId} |
| | | |
| | | <if test="pageEventGridDataDTO.keyWord != null and pageEventGridDataDTO.keyWord != """> |
| | | AND (egd.grid_name like concat(#{pageEventGridDataDTO.keyWord},'%') or su.nick_name like concat(#{pageEventGridDataDTO.keyWord},'%')) |
| | | </if> |
| | | <if test="pageEventGridDataDTO.gridStreetId!=null"> |
| | | AND grid_street_id = #{pageEventGridDataDTO.gridStreetId} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.gridCommunityId!=null"> |
| | | AND grid_community_id = #{pageEventGridDataDTO.gridCommunityId} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.gridName!=null"> |
| | | AND grid_name = #{pageEventGridDataDTO.gridName} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.mapLevel!=null"> |
| | | AND map_level = #{pageEventGridDataDTO.mapLevel} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.area!=null"> |
| | | AND area = #{pageEventGridDataDTO.area} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.lineColor!=null"> |
| | | AND line_color = #{pageEventGridDataDTO.lineColor} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.lineBroadband!=null"> |
| | | AND line_broadband = #{pageEventGridDataDTO.lineBroadband} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.fillColor!=null"> |
| | | AND fill_color = #{pageEventGridDataDTO.fillColor} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.remarks!=null"> |
| | | AND remarks = #{pageEventGridDataDTO.remarks} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.data!=null"> |
| | | AND data = #{pageEventGridDataDTO.data} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.createBy!=null"> |
| | | AND create_by = #{pageEventGridDataDTO.createBy} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.createAtBegin!=null"> |
| | | AND create_at >= #{pageEventGridDataDTO.createAtBegin} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.createAtEnd!=null"> |
| | | AND create_at <= #{pageEventGridDataDTO.createAtEnd} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.updateBy!=null"> |
| | | AND update_by = #{pageEventGridDataDTO.updateBy} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.updateAtBegin!=null"> |
| | | AND update_at >= #{pageEventGridDataDTO.updateAtBegin} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.updateAtEnd!=null"> |
| | | AND update_at <= #{pageEventGridDataDTO.updateAtEnd} |
| | | </if> |
| | | </where> |
| | | <if test="pageEventGridDataDTO.sortColumns!=null"> |
| | | ORDER BY ${pageEventGridDataDTO.sortColumns} ${pageEventGridDataDTO.sortType} |
| | | </if> |
| | | ORDER BY create_at desc |
| | | </select> |
| | | <select id="selectUserGrid" resultType="com.panzhihua.common.model.vos.grid.EventGridDataVO" |
| | | parameterType="com.panzhihua.common.model.dtos.grid.PageEventGridDataDTO"> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getGridMemberLists" resultType="com.panzhihua.common.model.vos.grid.EventGridMemberAdminVO"> |
| | | select user_id,nick_name from sys_user where act_id = #{communityId} |
| | | </select> |
| | | |
| | | <select id="getGridMember" resultType="String"> |
| | | SELECT |
| | | su.nick_name |
| | | FROM |
| | | event_grid_member_relation AS egmr |
| | | LEFT JOIN sys_user AS su ON su.user_id = egmr.grid_member_id |
| | | WHERE |
| | | egmr.grid_id = #{gridId} |
| | | </select> |
| | | |
| | | </mapper> |