wangxianzhang 3 years ago
parent
commit
de4329adb8
  1. 6
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

6
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

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

Loading…
Cancel
Save