|
@@ -401,14 +401,16 @@
|
|
|
select <include refid="General_Column_List"></include>,
|
|
|
sa1.name as province_name,
|
|
|
sa2.name as city_name,
|
|
|
- sa3.name as region_name
|
|
|
+ sa3.name as region_name,
|
|
|
+ so.name OrgName
|
|
|
from sc_community sc
|
|
|
left join sc_area sa1 on sa1.id = sc.province
|
|
|
left join sc_area sa2 on sa2.id = sc.city
|
|
|
left join sc_area sa3 on sa3.id = sc.region
|
|
|
+ left join sc_organization so on sc.org_id=so.id
|
|
|
where sc.status = 1
|
|
|
- <if test="siteId != null"> and site_id = #{siteId} </if>
|
|
|
- <if test="customerId != null"> and customer_id = #{customerId} </if>
|
|
|
+ <if test="siteId != null"> and sc.site_id = #{siteId} </if>
|
|
|
+ <if test="customerId != null"> and sc.customer_id = #{customerId} </if>
|
|
|
<if test="communityName != null and communityName != ''"> and sc.name like concat('%',#{communityName} ,'%')</if>
|
|
|
<if test="province != null"> and sc.province = #{province}</if>
|
|
|
<if test="city != null"> and sc.city = #{city}</if>
|