|
|
@ -71,7 +71,20 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryList" parameterType="map" resultType="com.epmet.dto.IcPropertyManagementDTO"> |
|
|
|
select m.* |
|
|
|
select * from ( |
|
|
|
select m.*, |
|
|
|
( |
|
|
|
SELECT |
|
|
|
count(p.NEIGHBOR_HOOD_ID) |
|
|
|
FROM |
|
|
|
ic_neighbor_hood_property p |
|
|
|
INNER JOIN ic_neighbor_hood h |
|
|
|
ON ( p.NEIGHBOR_HOOD_ID = h.ID ) |
|
|
|
WHERE p.DEL_FLAG = '0' |
|
|
|
and p.PROPERTY_ID =m.id |
|
|
|
AND (h.AGENCY_ID = #{agencyId} or h.AGENCY_PIDS like concat('%',#{agencyId},'%') ) |
|
|
|
AND h.DEL_FLAG = '0' |
|
|
|
)as totalNeighborHood |
|
|
|
from ic_property_management m |
|
|
|
where m.del_flag='0' |
|
|
|
and m.customer_id=#{customerId} |
|
|
@ -84,6 +97,7 @@ |
|
|
|
<if test="contactMobile != null and contactMobile != ''"> |
|
|
|
and m.CONTACT_MOBILE like concat('%',#{contactMobile},'%') |
|
|
|
</if> |
|
|
|
order by m.CREATED_TIME desc |
|
|
|
)t |
|
|
|
order by t.totalNeighborHood desc,t.CREATED_TIME desc |
|
|
|
</select> |
|
|
|
</mapper> |