| | |
| | | |
| | | <!--自定义分页查询--> |
| | | <select id="selectPlacePage" resultType="org.springblade.modules.place.vo.PlaceVO"> |
| | | select jp.*,bu.real_name as username,bu.phone as phone from jczz_place jp |
| | | select |
| | | jp.*, |
| | | bu.real_name as username,bu.phone as phone, |
| | | bx.real_name as createUserName |
| | | from jczz_place jp |
| | | left join blade_user bu on bu.id = jp.principal_user_id and bu.is_deleted = 0 |
| | | left join blade_user bx on bx.id = jp.create_user and bx.is_deleted = 0 |
| | | left join ( |
| | | select a.* from jczz_place_poi_label a inner join |
| | | ( |
| | |
| | | ) b on a.id = b.id |
| | | ) jppl on jppl.place_id = jp.id |
| | | where jp.is_deleted = 0 |
| | | <if test="place.roleName!=null and place.roleName!=''"> |
| | | <choose> |
| | | <when test="place.roleName=='网格员'"> |
| | | and |
| | | ( |
| | | jp.create_user = #{place.createUser} |
| | | <if test="houseCodeList != null and houseCodeList.size()>0"> |
| | | or jp.house_code in |
| | | <foreach collection="houseCodeList" item="houseCode" separator ="," open="(" close=")"> |
| | | #{houseCode} |
| | | </foreach> |
| | | </if> |
| | | ) |
| | | </when> |
| | | <otherwise> |
| | | and jp.principal_user_id = #{place.createUser} |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | <if test="place.placeName!=null and place.placeName!=''"> |
| | | and jp.place_name like concat('%',#{place.placeName},'%') |
| | | </if> |