| | |
| | | ) 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> |