Browse Source

Merge branch 'master' into release/yaoqingma_phone

feature/dangjian
管理员 6 years ago
parent
commit
8856914a5f
  1. 123
      esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/group/GroupDao.xml
  2. 64
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/UserController.java
  3. 11
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserDao.java
  4. 21
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserService.java
  5. 56
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java
  6. 6
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PartyMembersDao.xml
  7. 116
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserDao.xml

123
esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/group/GroupDao.xml

@ -108,82 +108,71 @@
<select id="selectListGroupsOfMine" resultType="com.elink.esua.epdc.dto.group.result.GroupsOfMineResultDTO">
SELECT
tmp.ID,
tmp.GROUP_NAME,
tmp.GROUP_AVATAR,
tmp.GROUP_CATEGORY,
tmp.STATE,
tmp.totalNum,
tmp.partyMemberNum,
tmp.unreadTopicNum,
tmp.latestTopicTime,
CASE
WHEN tmp.STATE = 0 THEN
'网格长会尽快审核您创建的社群,请耐心等待'
WHEN tmp.STATE = 5 THEN
tmp.PROCESSING_OPINIONS
WHEN (
tmp.STATE = 10
AND totalNum <![CDATA[ <= ]]> 1
AND tmp.GROUP_CATEGORY = '1'
AND tmp.topicNum = 0
) THEN
'您的社群审核已通过,快加好友进来吧' ELSE ''
END AS description
FROM
(
SELECT
gp.ID,
gp.GROUP_NAME,
gp.GROUP_AVATAR,
gp.GROUP_CATEGORY,
gp.STATE,
gp.PROCESSING_OPINIONS,
(
SELECT
COUNT( t.ID )
FROM
epdc_user_group t
WHERE
t.GROUP_ID = gp.ID
AND t.DEL_FLAG = '0'
AND t.STATE = 10
) AS totalNum,
t.ID,
t.GROUP_NAME,
t.GROUP_AVATAR,
t.GROUP_CATEGORY,
t.STATE,
t.totalNum,
t.partyMemberNum,
COUNT( DISTINCT ugpr.ID ) AS unreadTopicNum,
MAX( tp.CREATED_TIME ) AS latestTopicTime,
CASE
WHEN t.STATE = 0 THEN
'网格长会尽快审核您创建的社群,请耐心等待'
WHEN t.STATE = 5 THEN
t.PROCESSING_OPINIONS
WHEN (
t.STATE = 10
AND t.totalNum <![CDATA[ <= ]]> 1
AND t.GROUP_CATEGORY = '1'
AND COUNT( DISTINCT tp.ID ) = 0
) THEN
'您的社群审核已通过,快加好友进来吧' ELSE ''
END AS description
FROM
(
SELECT
COUNT( t1.ID )
FROM
epdc_user_group t1
WHERE
t1.GROUP_ID = gp.ID
AND t1.DEL_FLAG = '0'
AND t1.STATE = 10
AND t1.PARTY_MEMBER = '1'
) AS partyMemberNum,
COUNT( DISTINCT ugpr.ID ) AS unreadTopicNum,
MAX( tp.CREATED_TIME ) AS latestTopicTime,
COUNT( DISTINCT tp.ID ) AS topicNum
gp.ID,
gp.GROUP_NAME,
gp.GROUP_AVATAR,
gp.GROUP_CATEGORY,
gp.STATE,
gp.PROCESSING_OPINIONS,
SUM( ugp.STATE = 10 ) AS totalNum,
SUM( ugp.PARTY_MEMBER = '1' ) AS partyMemberNum
FROM
epdc_group gp
RIGHT JOIN epdc_user_group ugp ON gp.ID = ugp.GROUP_ID
LEFT JOIN epdc_user_group ugp ON ugp.GROUP_ID = gp.ID
AND ugp.DEL_FLAG = '0'
AND ugp.USER_ID = #{userId}
AND ugp.STATE = 10
LEFT JOIN epdc_group_topic_user_read ugpr ON gp.ID = ugpr.GROUP_ID
AND ugpr.DEL_FLAG = '0'
AND ugpr.USER_ID = #{userId}
AND ugpr.READ_FLAG = '0'
LEFT JOIN epdc_topic tp ON gp.ID = tp.GROUP_ID
AND tp.DEL_FLAG = '0'
WHERE
gp.DEL_FLAG = '0'
AND gp.GRID_ID = #{gridId}
<![CDATA[ AND gp.STATE <> ]]> 20
gp.ID IN (
SELECT
gp.ID
FROM
epdc_group gp
RIGHT JOIN epdc_user_group ugp ON gp.ID = ugp.GROUP_ID
AND ugp.DEL_FLAG = '0'
AND ugp.STATE = 10
AND ugp.USER_ID = #{userId}
WHERE
gp.DEL_FLAG = '0'
AND gp.STATE <![CDATA[ AND gp.STATE <> ]]> 20
AND gp.GRID_ID = #{gridId}
)
GROUP BY
gp.ID
ORDER BY
MAX( tp.CREATED_TIME ) DESC
) tmp
) t
LEFT JOIN epdc_group_topic_user_read ugpr ON t.ID = ugpr.GROUP_ID
AND ugpr.DEL_FLAG = '0'
AND ugpr.USER_ID = #{userId}
AND ugpr.READ_FLAG = '0'
LEFT JOIN epdc_topic tp ON t.ID = tp.GROUP_ID
AND tp.DEL_FLAG = '0'
GROUP BY
t.ID
ORDER BY
latestTopicTime DESC
</select>

64
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/UserController.java

@ -112,24 +112,38 @@ public class UserController {
}
@GetMapping("export")
@DataFilter(tableAlias = "ug", isPendingCreator = false, deptId = "GRID_ID", prefix = "AND")
@DataFilter(tableAlias = "u", isPendingCreator = false, deptId = "DEPT_ID", prefix = "AND")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<UserDTO> list = userService.list(params);
String auditState = (String) params.get("state");
// 状态(0-未审核,1-审核通过,2-审核未通过)
String fileName = null;
if (AppUserStatesEnum.STATE_COMPLETED_INFORMATION_PENDING_REVIEW.equals(auditState)) {
fileName = "未审核";
} else if (AppUserStatesEnum.STATE_INFORMATION_PASSED.equals(auditState)) {
fileName = "审核通过";
} else if (AppUserStatesEnum.STATE_INFORMATION_NOT_PASSED.equals(auditState)) {
fileName = "审核未通过";
}else if (AppUserStatesEnum.STATE_REGISTERED.equals(auditState)) {
fileName = "已注册";
if (AppUserStatesEnum.STATE_COMPLETED_INFORMATION_PENDING_REVIEW.value().equals(auditState)) {
fileName = "待认证居民";
} else if (AppUserStatesEnum.STATE_INFORMATION_PASSED.value().equals(auditState)) {
fileName = "已认证居民";
} else if (AppUserStatesEnum.STATE_INFORMATION_NOT_PASSED.value().equals(auditState)) {
fileName = "居民认证失败";
} else if (AppUserStatesEnum.STATE_REGISTERED.value().equals(auditState)) {
fileName = "未认证居民";
}
ExcelUtils.exportExcelToTarget(response, fileName, list, UserExcel.class);
}
/***
* 未认证导出
* @param params
* @param response
* @return void
* @author qushutong
* @date 2020/3/18 15:59
*/
@GetMapping("unauthorizedexport")
@DataFilter(tableAlias = "ug", isPendingCreator = false, deptId = "GRID_ID", prefix = "AND")
public void unauthorizedExport(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<UserDTO> list = userService.list(params);
ExcelUtils.exportExcelToTarget(response, "未认证居民", list, UserExcel.class);
}
/***
* 批量导入
@ -139,7 +153,35 @@ public class UserController {
* @date 2019/10/24 14:55
*/
@PostMapping("importExcel")
public Result importExcel(@RequestParam("file") MultipartFile file,@RequestParam Map<String, Object> params) {
return userService.insertUserList(file,params);
public Result importExcel(@RequestParam("file") MultipartFile file, @RequestParam Map<String, Object> params) {
return userService.insertUserList(file, params);
}
/***
* 展示所有的
* @param params
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData < com.elink.esua.epdc.dto.UserDTO>>
* @author qushutong
* @date 2020/3/16 10:51
*/
@GetMapping("alluserpage")
public Result<PageData<UserDTO>> alluserpage(@RequestParam Map<String, Object> params) {
PageData<UserDTO> page = userService.allUserPage(params);
return new Result<PageData<UserDTO>>().ok(page);
}
/***
* 已认证居民
* @param params
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData < com.elink.esua.epdc.dto.UserDTO>>
* @author qushutong
* @date 2020/3/16 16:54
*/
@GetMapping("authenticatedpage")
@DataFilter(tableAlias = "u", isPendingCreator = false, deptId = "DEPT_ID", prefix = "AND")
public Result<PageData<UserDTO>> authenticatedpage(@RequestParam Map<String, Object> params) {
PageData<UserDTO> page = userService.authenticatedpage(params);
return new Result<PageData<UserDTO>>().ok(page);
}
}

11
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserDao.java

@ -188,4 +188,15 @@ public interface UserDao extends BaseDao<UserEntity> {
* @since 2020/3/7 15:31
*/
List<UserDTO> selectListOfOrganizationInfo(String deptId);
/***
* 用户不关联网格关系表
* @param params
* @return java.util.List<com.elink.esua.epdc.dto.UserDTO>
* @author qushutong
* @date 2020/3/16 16:18
*/
List<UserDTO> selectAuthenticatedListUserDto(Map<String, Object> params);
}

21
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserService.java

@ -308,4 +308,25 @@ public interface UserService extends BaseService<UserEntity> {
* @since 2020/3/7 1:23
*/
void modifyOrganizationInfo(OrganizationModifyDTO dto);
/***
* 所有用户 用来锁定已注册在别的微信里面的信息
* @param params
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.UserDTO>
* @author qushutong
* @date 2020/3/16 10:53
*/
PageData<UserDTO> allUserPage(Map<String, Object> params);
/***
* 已认证列表
* @param params
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.UserDTO>
* @author qushutong
* @date 2020/3/16 16:16
*/
PageData<UserDTO> authenticatedpage(Map<String, Object> params);
}

56
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java

@ -129,7 +129,12 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
@Override
public List<UserDTO> list(Map<String, Object> params) {
this.verifyParams(params);
return this.baseDao.selectListUserDto(params);
String auditState = (String) params.get("state");
if (AppUserStatesEnum.STATE_REGISTERED.value().equals(auditState)) {
return this.baseDao.selectListUserDto(params);
} else {
return this.baseDao.selectAuthenticatedListUserDto(params);
}
}
private Map<String, Object> verifyParams(Map<String, Object> params) {
@ -595,9 +600,8 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
EpdcCompleteAppUserDTO completeAppUser = formDto.getCompleteAppUser();
UserDTO userDto = ConvertUtils.sourceToTarget(completeAppUser, UserDTO.class);
if (StringUtils.isBlank(userDto.getWxUnionId())) {
userDto.setWxUnionId(null);
}
userDto.setWxUnionId(StringUtils.isBlank(userDto.getWxUnionId()) ? null : userDto.getWxUnionId());
userDto.setFaceImg(StringUtils.isBlank(userDto.getFaceImg()) ? null : userDto.getFaceImg());
UserGridRelationDTO userGridRelation = formDto.getUserGridRelation();
String userId = userDto.getId();
@ -620,7 +624,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
partyMembersEntity.setGridName(userGridRelation.getGrid());
partyMembersEntity.setRegistFlag(PartyMemberRegFlagEnum.AUTO.getValue());
partyMembersEntity.setMobile(userDto.getMobile());
partyMembersEntity.setRegistTime(oldEntity.getRegisterTime());
partyMembersEntity.setRegistTime(new Date());
QueryWrapper<PartyMembersEntity> partyWrapper = new QueryWrapper<>();
partyWrapper.eq(UserFieldConsant.IDENTITY_NO, identityNo)
.eq(UserFieldConsant.REAL_NAME, userDto.getRealName());
@ -636,7 +640,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
authenticationFailedEntity.setRealName(userDto.getRealName());
authenticationFailedEntity.setMobile(userDto.getMobile());
authenticationFailedEntity.setIdentityNo(identityNo);
authenticationFailedEntity.setRegistTime(oldEntity.getRegisterTime());
authenticationFailedEntity.setRegistTime(new Date());
partyAuthenticationFailedDao.insert(authenticationFailedEntity);
userDto.setState(AppUserStatesEnum.STATE_COMPLETED_INFORMATION_PENDING_REVIEW.value());
@ -692,7 +696,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
UserGridRelationDTO relationInfo = userGridRelationService.getUserRelationInfo(userEntity.getId(), userGridRelation.getGridId());
userDto.setLeaderFlag(relationInfo.getLeaderFlag());
userDto.setFaceImg(oldEntity.getFaceImg());
userDto.setFaceImg(StringUtils.isBlank(userDto.getFaceImg()) ? oldEntity.getFaceImg() : userDto.getFaceImg());
return result.ok(userDto);
}
@ -863,7 +867,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
/**
* @param gridIdList
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < com.elink.esua.epdc.dto.epdc.result.EpdcGridUserResultDTO>>
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < com.elink.esua.epdc.dto.epdc.result.EpdcGridUserResultDTO>>
* @Author yinzuomei
* @Description 根据网格id查询网格下所有的用户
* @Date 2019/12/19 15:03
@ -1124,18 +1128,18 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
}
}
/**
*
* 组织机构信息处理
*
* @params [dto, userList]
* @return java.util.List<com.elink.esua.epdc.entity.UserEntity>
* @params [dto, userList]
* @author liuchuang
* @since 2020/3/7 15:22
*/
private List<UserEntity> handleOrganizationInfo(OrganizationModifyDTO dto, List<UserDTO> userList) {
List<UserEntity> entities = new ArrayList<>();
for (UserDTO user: userList) {
for (UserDTO user : userList) {
UserEntity entity = new UserEntity();
if (StringUtils.isNotEmpty(user.getParentDeptIds()) && StringUtils.isNotEmpty(user.getParentDeptNames())) {
List<String> parentDeptIds = Arrays.asList(user.getParentDeptIds().split(","));
@ -1164,4 +1168,34 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
return entities;
}
@Override
@DataSource(value = DataSourceNames.FIRST)
public PageData<UserDTO> allUserPage(Map<String, Object> params) {
String[] paramKeys = new String[]{"nickname", "identityNo", "realName", "identityNo", "mobile", "startTime", "endTime"};
if (AppUserUtils.isDefaultQuery(params, paramKeys)) {
List<UserDTO> userDtoList = Lists.newArrayList();
return new PageData<>(userDtoList, NumConstant.ZERO);
}
this.verifyParams(params);
// 查询当前用户所具有的的数据权限
IPage<UserDTO> iPage = this.getPage(params);
List<UserDTO> userDtoList = this.baseDao.selectListUserDto(params);
return new PageData<>(userDtoList, iPage.getTotal());
}
@Override
public PageData<UserDTO> authenticatedpage(Map<String, Object> params) {
String[] paramKeys = new String[]{"streetId", "communityId", "gridId", "realName", "identityNo", "startTime", "endTime", "nickname", "mobile"};
if (AppUserUtils.isDefaultQuery(params, paramKeys)) {
List<UserDTO> userDtoList = Lists.newArrayList();
return new PageData<>(userDtoList, NumConstant.ZERO);
}
this.verifyParams(params);
// 查询当前用户所具有的的数据权限
IPage<UserDTO> iPage = this.getPage(params);
List<UserDTO> userDtoList = this.baseDao.selectAuthenticatedListUserDto(params);
return new PageData<>(userDtoList, iPage.getTotal());
}
}

6
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PartyMembersDao.xml

@ -89,9 +89,9 @@
<select id="hasAuthenticationPartyPage" resultType="com.elink.esua.epdc.dto.PartyMembersDTO">
SELECT
pm.CADRE_FLAG, pm.CREATED_BY,eu.CREATED_TIME, pm.DEPT_ID,
pm.ID,pm.IDENTITY_NO,eu.MOBILE,pm.POST,
pm.POST_VALUE,pm.REAL_NAME,pm.REGIST_FLAG,eu.REGISTER_TIME as registTime,
GROUP_CONCAT( ut.TAG_NAME ) TAG_NAME, pm.ALL_DEPT_NAMES as allDeptNames
pm.ID,eu.IDENTITY_NO,eu.MOBILE,pm.POST,
pm.POST_VALUE,eu.REAL_NAME,pm.REGIST_FLAG,eu.REGISTER_TIME as registTime,
GROUP_CONCAT( ut.TAG_NAME ) TAG_NAME, eu.ALL_DEPT_NAMES as allDeptNames
FROM
epdc_user eu
LEFT JOIN epdc_party_members pm on pm.IDENTITY_NO = eu.IDENTITY_NO and pm.REAL_NAME = eu.REAL_NAME

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

@ -70,7 +70,8 @@
ADDRESS,
STATE,
PARTY_FLAG,
ug.ALL_DEPT_NAMES AS myGridName
ug.ALL_DEPT_NAMES,
u.FACE_IMG
FROM
epdc_user u
LEFT JOIN epdc_user_grid_relation ug ON u.ID = ug.USER_ID
@ -320,7 +321,8 @@
</select>
<!-- 获取用户列表:党员认证失败 -->
<select id="selectPartyAuthenticationFailedList" parameterType="com.elink.esua.epdc.dto.epdc.form.EpdcWorkUserFromDTO"
<select id="selectPartyAuthenticationFailedList"
parameterType="com.elink.esua.epdc.dto.epdc.form.EpdcWorkUserFromDTO"
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcWorkUserResultDTO">
SELECT
u.ID as userId,
@ -341,12 +343,12 @@
<choose>
<when test="gridId != null and gridId > 0">AND ug.GRID_ID = #{gridId}</when>
<otherwise>
<if test="gridIdList!=null and gridIdList.size()>0">
AND ug.GRID_ID in
<foreach collection="gridIdList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="gridIdList!=null and gridIdList.size()>0">
AND ug.GRID_ID in
<foreach collection="gridIdList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</otherwise>
</choose>
GROUP BY
@ -356,44 +358,45 @@
</select>
<!-- 根据网格id查询网格下所有的用户 -->
<select id="selectListGridUserResultDTO" parameterType="map" resultType="com.elink.esua.epdc.dto.epdc.result.EpdcGridUserResultDTO">
<select id="selectListGridUserResultDTO" parameterType="map"
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcGridUserResultDTO">
SELECT
eu.id AS userId,
eu.NICKNAME,
eu.FACE_IMG AS userAvatar,
eu.MOBILE,
r.LEADER_FLAG AS lordFlag,
eu.PARTY_FLAG AS partyMember,
10 as STATE,
NULL AS auditOpinion,
r.GRID_ID AS gridId
eu.id AS userId,
eu.NICKNAME,
eu.FACE_IMG AS userAvatar,
eu.MOBILE,
r.LEADER_FLAG AS lordFlag,
eu.PARTY_FLAG AS partyMember,
10 as STATE,
NULL AS auditOpinion,
r.GRID_ID AS gridId
FROM
epdc_user_grid_relation r
LEFT JOIN epdc_user eu ON r.USER_ID = eu.ID
epdc_user_grid_relation r
LEFT JOIN epdc_user eu ON r.USER_ID = eu.ID
WHERE
r.DEL_FLAG = '0'
AND eu.DEL_FLAG = '0'
and (eu.PARTY_FLAG='1' or r.LEADER_FLAG='1')
<if test="gridIdList!=null and gridIdList.size()>0">
AND r.GRID_ID in
<foreach collection="gridIdList" index="index" item="gridId" open="(" separator="," close=")">
#{gridId}
</foreach>
</if>
r.DEL_FLAG = '0'
AND eu.DEL_FLAG = '0'
and (eu.PARTY_FLAG='1' or r.LEADER_FLAG='1')
<if test="gridIdList!=null and gridIdList.size()>0">
AND r.GRID_ID in
<foreach collection="gridIdList" index="index" item="gridId" open="(" separator="," close=")">
#{gridId}
</foreach>
</if>
</select>
<select id="selectListUserByWxForLogin" resultType="com.elink.esua.epdc.dto.UserDTO">
SELECT
u.ID, u.NICKNAME, u.FACE_IMG, u.MOBILE, u.PARTY_FLAG, u.REAL_NAME, u.SEX, u.STATE, ur.GRID_ID, ur.GRID
u.ID, u.NICKNAME, u.FACE_IMG, u.MOBILE, u.PARTY_FLAG, u.REAL_NAME, u.SEX, u.STATE, ur.GRID_ID, ur.GRID
FROM
epdc_user u
LEFT JOIN epdc_user_grid_relation ur ON u.ID = ur.USER_ID AND ur.DEL_FLAG = '0'
epdc_user u
LEFT JOIN epdc_user_grid_relation ur ON u.ID = ur.USER_ID AND ur.DEL_FLAG = '0'
WHERE
u.DEL_FLAG = '0'
<if test="wxOpenId != null and wxOpenId !=''">AND u.WX_OPEN_ID = #{wxOpenId}</if>
<if test="wxUnionId != null and wxUnionId !=''">AND u.WX_UNION_ID = #{wxUnionId}</if>
u.DEL_FLAG = '0'
<if test="wxOpenId != null and wxOpenId !=''">AND u.WX_OPEN_ID = #{wxOpenId}</if>
<if test="wxUnionId != null and wxUnionId !=''">AND u.WX_UNION_ID = #{wxUnionId}</if>
ORDER BY
ur.SWITCHED_TIME DESC
ur.SWITCHED_TIME DESC
</select>
<select id="selectListOfOrganizationInfo" resultType="com.elink.esua.epdc.dto.UserDTO">
@ -409,4 +412,45 @@
FIND_IN_SET( #{deptId}, ALL_DEPT_IDS )
</select>
<select id="selectAuthenticatedListUserDto" resultType="com.elink.esua.epdc.dto.UserDTO">
SELECT
u.id,
u.REAL_NAME,
u.NICKNAME,
u.MOBILE,
u.REGISTER_TIME,
u.CREATED_TIME,
IDENTITY_NO,
ADDRESS,
STATE,
PARTY_FLAG,
u.ALL_DEPT_NAMES,
u.FACE_IMG
FROM
epdc_user u
where
u.del_flag = '0'
<if test="startTime != '' and endTime != ''">and u.CREATED_TIME between #{startTime} and #{endTime}</if>
<if test="state != '' and state != null">and u.state = #{state}</if>
<if test="realName != '' and realName != null">and u.real_name like '%${realName}%'</if>
<if test="nickname != '' and nickname != null">and u.NICKNAME like '%${nickname}%'</if>
<if test="mobile != '' and mobile != null">and u.mobile like '%${mobile}%'</if>
<if test="identityNo != '' and identityNo != null">and u.identity_no like '%${identityNo}%'</if>
<if test="partyFlag != '' and partyFlag != null">and u.party_flag = #{partyFlag}</if>
<if test="streetId != '' and streetId != null">
AND (find_in_set(#{streetId},u.PARENT_DEPT_IDS)
OR find_in_set(#{streetId},u.ALL_DEPT_IDS))
</if>
<if test="communityId != '' and communityId != null">
AND (find_in_set(#{communityId},u.PARENT_DEPT_IDS)
OR find_in_set(#{communityId},u.ALL_DEPT_IDS))
</if>
<if test="gridId != '' and gridId != null">
AND
find_in_set(#{gridId},u.ALL_DEPT_IDS)
</if>
ORDER BY
u.register_time desc
</select>
</mapper>

Loading…
Cancel
Save