|
@ -330,20 +330,29 @@ |
|
|
FROM ic_resi_user |
|
|
FROM ic_resi_user |
|
|
WHERE DEL_FLAG = '0' |
|
|
WHERE DEL_FLAG = '0' |
|
|
AND CUSTOMER_ID = #{customerId} |
|
|
AND CUSTOMER_ID = #{customerId} |
|
|
|
|
|
AND (AGENCY_ID = #{agencyId} OR PIDS LIKE CONCAT('%',#{agencyId},'%')) |
|
|
<if test="level != null and level != ''"> |
|
|
<if test="level != null and level != ''"> |
|
|
<if test="level=='agency'"> |
|
|
<if test="level=='agency'"> |
|
|
|
|
|
<if test="id != null and id != ''"> |
|
|
AND (AGENCY_ID = #{id} OR PIDS LIKE CONCAT('%',#{id},'%')) |
|
|
AND (AGENCY_ID = #{id} OR PIDS LIKE CONCAT('%',#{id},'%')) |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
</if> |
|
|
<if test="level=='grid'"> |
|
|
<if test="level=='grid'"> |
|
|
|
|
|
<if test="id != null and id != ''"> |
|
|
AND GRID_ID = #{id} |
|
|
AND GRID_ID = #{id} |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
</if> |
|
|
<if test="level=='neighborHood'"> |
|
|
<if test="level=='neighborHood'"> |
|
|
|
|
|
<if test="id != null and id != ''"> |
|
|
AND VILLAGE_ID = #{id} |
|
|
AND VILLAGE_ID = #{id} |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
</if> |
|
|
<if test="level=='building'"> |
|
|
<if test="level=='building'"> |
|
|
|
|
|
<if test="id != null and id != ''"> |
|
|
AND BUILD_ID = #{id} |
|
|
AND BUILD_ID = #{id} |
|
|
</if> |
|
|
</if> |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
</if> |
|
|
<if test="name != null and name != ''"> |
|
|
<if test="name != null and name != ''"> |
|
|
AND `NAME` LIKE CONCAT('%',#{name},'%') |
|
|
AND `NAME` LIKE CONCAT('%',#{name},'%') |
|
|
</if> |
|
|
</if> |
|
|