|
|
@ -18,7 +18,9 @@ |
|
|
|
AND ugp.LORD_FLAG = '1' |
|
|
|
WHERE |
|
|
|
gp.DEL_FLAG = '0' |
|
|
|
AND gp.GROUP_CATEGORY = '2' |
|
|
|
AND gp.SECTION_CODE = 'theme_group' |
|
|
|
AND gp.CATEGORY_CODE = 'property_group' |
|
|
|
AND gp.TYPE_KEY = 'grid_party' |
|
|
|
<if test="state != null and state != ''"> |
|
|
|
AND gp.STATE = #{state} |
|
|
|
</if> |
|
|
@ -53,7 +55,46 @@ |
|
|
|
AND ugp.LORD_FLAG = '1' |
|
|
|
WHERE |
|
|
|
gp.DEL_FLAG = '0' |
|
|
|
AND gp.GROUP_CATEGORY = '3' |
|
|
|
AND gp.SECTION_CODE = 'theme_group' |
|
|
|
AND gp.CATEGORY_CODE = 'police_group' |
|
|
|
AND gp.TYPE_KEY = 'grid_party' |
|
|
|
<if test="state != null and state != ''"> |
|
|
|
AND gp.STATE = #{state} |
|
|
|
</if> |
|
|
|
<if test="gridId != null and gridId != ''"> |
|
|
|
AND (gp.DEPT_ID = #{gridId} |
|
|
|
OR find_in_set(#{gridId},gp.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="streetId != null and streetId != ''"> |
|
|
|
AND (find_in_set(#{streetId},gp.PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{streetId},gp.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="communityId != null and communityId != ''"> |
|
|
|
AND (find_in_set(#{communityId},gp.PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{communityId},gp.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
ORDER BY |
|
|
|
gp.GROUP_CATEGORY, gp.CREATED_TIME DESC |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectInterestListOfGroups" resultType="com.elink.esua.epdc.dto.group.GroupManagementDTO"> |
|
|
|
SELECT |
|
|
|
gp.ID, |
|
|
|
gp.GROUP_NAME, |
|
|
|
gp.GROUP_CATEGORY, |
|
|
|
gp.CREATED_TIME, |
|
|
|
ugp.NICKNAME, |
|
|
|
gp.STATE |
|
|
|
FROM |
|
|
|
epdc_group gp |
|
|
|
LEFT JOIN epdc_user_group ugp ON ugp.GROUP_ID = gp.ID |
|
|
|
AND ugp.DEL_FLAG = '0' |
|
|
|
AND ugp.LORD_FLAG = '1' |
|
|
|
WHERE |
|
|
|
gp.DEL_FLAG = '0' |
|
|
|
AND gp.SECTION_CODE = 'theme_group' |
|
|
|
AND gp.CATEGORY_CODE = 'interest_group' |
|
|
|
AND gp.TYPE_KEY = 'grid_party' |
|
|
|
<if test="state != null and state != ''"> |
|
|
|
AND gp.STATE = #{state} |
|
|
|
</if> |
|
|
|