|
|
@ -1024,18 +1024,18 @@ |
|
|
|
<!--开通社区列表--> |
|
|
|
<select id="getUsingCommunityList" resultType="string"> |
|
|
|
select ca.ID |
|
|
|
, ca.ORGANIZATION_NAME |
|
|
|
, ca.CREATED_TIME |
|
|
|
, count(csa.ID) community_count |
|
|
|
from customer_agency ca |
|
|
|
inner join customer_staff_agency csa on (ca.ID = csa.AGENCY_ID and csa.DEL_FLAG = 0) |
|
|
|
where ca.DEL_FLAG = 0 |
|
|
|
and ca.CUSTOMER_ID=${customerId} |
|
|
|
and ca.CUSTOMER_ID=#{customerId} |
|
|
|
and ca.LEVEL = 'community' |
|
|
|
<if test="endDate != null"> |
|
|
|
and csa.CREATED_TIME <![CDATA[<]]> #{endDate} |
|
|
|
</if> |
|
|
|
and (ca.ID = #{agencyId} or ca.PIDS like CONCAT(#{agencyOrgIdPath}, '%')) |
|
|
|
group by ca.ID, ca.ORGANIZATION_NAME |
|
|
|
group by ca.ID, ca.CREATED_TIME |
|
|
|
having community_count > 0 |
|
|
|
</select> |
|
|
|
</mapper> |
|
|
|