Browse Source

Merge remote-tracking branch 'origin/hotfix/lc_modifyResidentList'

feature/syp_points
liuchuang 5 years ago
parent
commit
104ab96ef4
  1. 36
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserDao.xml

36
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserDao.xml

@ -70,30 +70,34 @@
LIMIT 1 LIMIT 1
</select> </select>
<select id="selectListUserDto" resultType="com.elink.esua.epdc.dto.UserDTO"> <select id="selectListUserDto" resultType="com.elink.esua.epdc.dto.UserDTO">
SELECT select * from(
u.id, SELECT u.id,
u.REAL_NAME, u.REAL_NAME,
u.NICKNAME, u.NICKNAME,
u.MOBILE, u.MOBILE,
u.REGISTER_TIME, u.REGISTER_TIME,
u.CREATED_TIME, u.CREATED_TIME,
u.UPDATED_TIME,
IDENTITY_NO, IDENTITY_NO,
ADDRESS, ADDRESS,
STATE, STATE,
PARTY_FLAG, PARTY_FLAG,
ug.ALL_DEPT_NAMES AS myGridName ug.ALL_DEPT_NAMES AS myGridName,
FROM u.DEL_FLAG,
epdc_user u IF((u.DEPT_ID is null or u.DEPT_ID = '0'), ug.GRID_ID, u.DEPT_ID) as GRID_ID,
LEFT JOIN epdc_user_grid_relation ug ON u.ID = ug.USER_ID IF((u.DEPT_ID is null or u.DEPT_ID = '0'), ug.PARENT_DEPT_IDS, u.PARENT_DEPT_IDS) as PARENT_DEPT_IDS,
IF((u.DEPT_ID is null or u.DEPT_ID = '0'), ug.ALL_DEPT_IDS, u.ALL_DEPT_IDS) as ALL_DEPT_IDS
FROM epdc_user u
LEFT JOIN ( select * from (select * from epdc_user_grid_relation order by CREATED_TIME)t group by t.USER_ID) ug ON u.ID = ug.USER_ID)ug
where where
u.del_flag = '0' ug.del_flag = '0'
<if test="startTime != '' and endTime != ''">and u.CREATED_TIME between #{startTime} and #{endTime}</if> <if test="startTime != '' and endTime != ''">and ug.CREATED_TIME between #{startTime} and #{endTime}</if>
<if test="state != '' and state != null">and u.state = #{state}</if> <if test="state != '' and state != null">and ug.state = #{state}</if>
<if test="realName != '' and realName != null">and u.real_name like '%${realName}%'</if> <if test="realName != '' and realName != null">and ug.real_name like '%${realName}%'</if>
<if test="nickname != '' and nickname != null">and u.NICKNAME like '%${nickname}%'</if> <if test="nickname != '' and nickname != null">and ug.NICKNAME like '%${nickname}%'</if>
<if test="mobile != '' and mobile != null">and u.mobile like '%${mobile}%'</if> <if test="mobile != '' and mobile != null">and ug.mobile like '%${mobile}%'</if>
<if test="identityNo != '' and identityNo != null">and u.identity_no like '%${identityNo}%'</if> <if test="identityNo != '' and identityNo != null">and ug.identity_no like '%${identityNo}%'</if>
<if test="partyFlag != '' and partyFlag != null">and u.party_flag = #{partyFlag}</if> <if test="partyFlag != '' and partyFlag != null">and ug.party_flag = #{partyFlag}</if>
<if test="streetId != '' and streetId != null"> <if test="streetId != '' and streetId != null">
AND (find_in_set(#{streetId},ug.PARENT_DEPT_IDS) AND (find_in_set(#{streetId},ug.PARENT_DEPT_IDS)
OR find_in_set(#{streetId},ug.ALL_DEPT_IDS)) OR find_in_set(#{streetId},ug.ALL_DEPT_IDS))
@ -107,9 +111,9 @@
OR find_in_set(#{gridId},ug.ALL_DEPT_IDS)) OR find_in_set(#{gridId},ug.ALL_DEPT_IDS))
</if> </if>
GROUP BY GROUP BY
u.ID ug.ID
ORDER BY ORDER BY
u.register_time desc ug.register_time desc
</select> </select>
<!-- 根据userId获取居民详情(已认证或待认证(提交信息待审核)的居民用户) --> <!-- 根据userId获取居民详情(已认证或待认证(提交信息待审核)的居民用户) -->
<resultMap id="EpdcResidentDetailResultDtoMap" <resultMap id="EpdcResidentDetailResultDtoMap"

Loading…
Cancel
Save