Browse Source

党群管理bug修改

feature/syp_points
songyunpeng 5 years ago
parent
commit
f44f4c5456
  1. 8
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/PartyGroupOfficialsDTO.java
  2. 2
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/constant/PartyGroupConstant.java
  3. 13
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/PartyGroupController.java
  4. 8
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyGroupDao.java
  5. 8
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/entity/PartyGroupOfficialsEntity.java
  6. 9
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyGroupService.java
  7. 1
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyUserGroupService.java
  8. 77
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyGroupServiceImpl.java
  9. 3
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyUserGroupServiceImpl.java
  10. 7
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyGroupDao.xml
  11. 46
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyGroupOfficialsDao.xml
  12. 4
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyUserGroupDao.xml
  13. 12
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/UserController.java
  14. 9
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserDao.java
  15. 8
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserService.java
  16. 7
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java
  17. 59
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserDao.xml

8
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/PartyGroupOfficialsDTO.java

@ -17,12 +17,12 @@
package com.elink.esua.epdc.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import lombok.Data;
/**
* 网格长楼长
@ -44,6 +44,10 @@ public class PartyGroupOfficialsDTO implements Serializable {
* 党群ID
*/
private String partyGroupId;
/**
* 党群名
*/
private String partyGroupName;
/**
* 姓名

2
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/constant/PartyGroupConstant.java

@ -18,6 +18,6 @@ public interface PartyGroupConstant {
/**
* 党群身份标识 群主
*/
String PARTY_GROUP_IDENTITY_FLAG = "1";
String PARTY_GROUP_IDENTITY_FLAG = "0";
}

13
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/PartyGroupController.java

@ -24,14 +24,12 @@ import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.dto.PartyGroupDTO;
import com.elink.esua.epdc.dto.PartyGroupListDTO;
import com.elink.esua.epdc.dto.UserDTO;
import com.elink.esua.epdc.excel.PartyGroupExcel;
import com.elink.esua.epdc.service.PartyGroupService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -109,13 +107,4 @@ public class PartyGroupController {
}
@GetMapping("getUserList/{deptId}")
public Result<List<UserDTO>> getUserList(@PathVariable("deptId") Long deptId) {
if(deptId==null){
return new Result<List<UserDTO>>().error("部门ID为空!");
}
List<UserDTO> data = partyGroupService.getUserList(deptId);
return new Result<List<UserDTO>>().ok(data);
}
}

8
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyGroupDao.java

@ -66,4 +66,12 @@ public interface PartyGroupDao extends BaseDao<PartyGroupEntity> {
* @return java.util.List<com.elink.esua.epdc.dto.result.PartyGroupResultDTO>
**/
List<PartyGroupResultDTO> getAllPartyGroup(String userId);
/**
* @Description 根据党群名获取党群
* @Author songyunpeng
* @Date 2020/6/5
* @Param [partyGroupName]
* @return com.elink.esua.epdc.dto.PartyGroupDTO
**/
PartyGroupDTO getPartyGroupDTOByName(String partyGroupName);
}

8
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/entity/PartyGroupOfficialsEntity.java

@ -18,13 +18,10 @@
package com.elink.esua.epdc.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 网格长楼长
*
@ -43,6 +40,11 @@ public class PartyGroupOfficialsEntity extends BaseEpdcEntity {
*/
private String partyGroupId;
/**
* 党群名
*/
private String partyGroupName;
/**
* 姓名
*/

9
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyGroupService.java

@ -137,4 +137,13 @@ public interface PartyGroupService extends BaseService<PartyGroupEntity> {
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result joinGroup(PartyUserJoinGroupFormDTO partyUserJoinGroupFormDTO);
/**
* @Description 根据党群名获取党群
* @Author songyunpeng
* @Date 2020/6/5
* @Param [partyGroupName]
* @return com.elink.esua.epdc.dto.PartyGroupDTO
**/
PartyGroupDTO getPartyGroupDTOByName(String partyGroupName);
}

1
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyUserGroupService.java

@ -171,4 +171,5 @@ public interface PartyUserGroupService extends BaseService<PartyUserGroupEntity>
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result modifyIdentity(PartyUserIdentityFormDTO formDTO);
}

77
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyGroupServiceImpl.java

@ -83,8 +83,8 @@ public class PartyGroupServiceImpl extends BaseServiceImpl<PartyGroupDao, PartyG
return ConvertUtils.sourceToTarget(entityList, PartyGroupDTO.class);
}
private QueryWrapper<PartyGroupEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
private QueryWrapper<PartyGroupEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper<PartyGroupEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
@ -94,24 +94,49 @@ public class PartyGroupServiceImpl extends BaseServiceImpl<PartyGroupDao, PartyG
@Override
public PartyGroupDTO get(String id) {
return baseDao.selectDetailById(id);
return baseDao.selectDetailById(id);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(PartyGroupDTO dto) {
//确认党群名字是否重复
this.isPartyGroupNameExists(dto);
//保存部门信息
this.saveDeptInfo(dto);
PartyGroupEntity entity = ConvertUtils.sourceToTarget(dto, PartyGroupEntity.class);
insert(entity);
//保存群主信息
this.insertUserGroup(dto.getUserId(),entity.getId());
this.insertUserGroup(dto.getUserId(), entity.getId());
}
private void isPartyGroupNameExists(PartyGroupDTO dto) {
//先判断党群名是否重复
if (StringUtils.isNotBlank(dto.getId())) {
//代表更新党群
PartyGroupDTO oldPartyGroupDTO = get(dto.getId());
if (oldPartyGroupDTO == null) {
throw new RenException("该党群不存在");
}
//若是改名则判断新名字是否重复
if (!dto.getPartyGroupName().equals(oldPartyGroupDTO.getPartyGroupName())) {
PartyGroupDTO partyGroupDTO = getPartyGroupDTOByName(dto.getPartyGroupName());
if (partyGroupDTO != null) {
throw new RenException("该党群名名字已存在");
}
}
} else {
PartyGroupDTO partyGroupDTO = getPartyGroupDTOByName(dto.getPartyGroupName());
if (partyGroupDTO != null) {
throw new RenException("该党群名名字已存在");
}
}
}
private void saveDeptInfo(PartyGroupDTO dto) {
//赋值部门名称
Result<SysDeptDTO> sysDeptDTO = adminFeignClient.getSysDeptDTO(Long.parseLong(dto.getDeptId()));
if(!sysDeptDTO.success() || sysDeptDTO.getData()==null){
if (!sysDeptDTO.success() || sysDeptDTO.getData() == null) {
throw new RenException(sysDeptDTO.getMsg());
}
SysDeptDTO dept = sysDeptDTO.getData();
@ -129,31 +154,32 @@ public class PartyGroupServiceImpl extends BaseServiceImpl<PartyGroupDao, PartyG
}
}
private void insertUserGroup(String userId,String partyGroupId) {
private void insertUserGroup(String userId, String partyGroupId) {
Result<UserDTO> userInfoById = userFeignClient.getUserInfoById(userId);
if(!userInfoById.success() || userInfoById.getData() == null){
if (!userInfoById.success() || userInfoById.getData() == null) {
throw new RenException("获取用户信息失败");
}
UserDTO userDto = userInfoById.getData();
PartyUserGroupEntity partyUserGroupEntity = new PartyUserGroupEntity();
partyUserGroupEntity.setIdentityFlag(userDto.getPartyFlag());
partyUserGroupEntity.setPartyMember(userDto.getPartyFlag());
partyUserGroupEntity.setUserId(userDto.getId());
partyUserGroupEntity.setNickname(userDto.getNickname());
partyUserGroupEntity.setUserAvatar(userDto.getFaceImg());
partyUserGroupEntity.setMobile(userDto.getMobile());
partyUserGroupEntity.setPartyGroupId(partyGroupId);
partyUserGroupEntity.setIdentityFlag("1");
//身份标识为群主
partyUserGroupEntity.setIdentityFlag("0");
//网格信息
if(userDto.getGridId()!=null && userDto.getGridId()!=0){
if (userDto.getGridId() != null && userDto.getGridId() != 0) {
partyUserGroupEntity.setGrid(userDto.getGrid());
partyUserGroupEntity.setGridId(userDto.getGridId());
partyUserGroupEntity.setAllDeptIds(userDto.getAllDeptIds());
partyUserGroupEntity.setAllDeptNames(userDto.getAllDeptNames());
partyUserGroupEntity.setParentDeptIds(userDto.getParentDeptIds());
partyUserGroupEntity.setParentDeptNames(userDto.getParentDeptNames());
}else{
} else {
Result<UserGridRelationDTO> userFirstScanGird = userFeignClient.getUserFirstScanGird(userId);
if(!userFirstScanGird.success() || userFirstScanGird.getData() == null){
if (!userFirstScanGird.success() || userFirstScanGird.getData() == null) {
throw new RenException("获取用户网格关联信息失败");
}
UserGridRelationDTO userGridRelationDTO = userFirstScanGird.getData();
@ -171,6 +197,7 @@ public class PartyGroupServiceImpl extends BaseServiceImpl<PartyGroupDao, PartyG
@Override
@Transactional(rollbackFor = Exception.class)
public void update(PartyGroupDTO dto) {
this.isPartyGroupNameExists(dto);
//保存部门信息
this.saveDeptInfo(dto);
PartyGroupEntity entity = ConvertUtils.sourceToTarget(dto, PartyGroupEntity.class);
@ -178,19 +205,20 @@ public class PartyGroupServiceImpl extends BaseServiceImpl<PartyGroupDao, PartyG
//判断是否更新群主
PartyUserGroupDTO managerByGroupId = partyUserGroupService.getManagerByGroupId(dto.getId());
//存在群主且如过改变群主信息 则之前群主为群成员
if(managerByGroupId != null && !managerByGroupId.getUserId().equals(dto.getUserId())){
if (managerByGroupId != null && !managerByGroupId.getUserId().equals(dto.getUserId())) {
//先更新之前的群主为群成员
managerByGroupId.setIdentityFlag("0");
managerByGroupId.setIdentityFlag("2");
partyUserGroupService.update(managerByGroupId);
}
//判断新指定的群主是否已存在党群成员中
PartyUserGroupDTO userByGroupIdAndUserId = partyUserGroupService.getUserByGroupIdAndUserId(dto.getId(), dto.getUserId());
//新指定群主不存在则直接新增
if(userByGroupIdAndUserId==null){
if (userByGroupIdAndUserId == null) {
//保存群主信息
this.insertUserGroup(dto.getUserId(),entity.getId());
}else{//存在则只更新身份标识
userByGroupIdAndUserId.setIdentityFlag("1");
this.insertUserGroup(dto.getUserId(), entity.getId());
} else {//存在则只更新身份标识
//身份标识为群主
userByGroupIdAndUserId.setIdentityFlag("0");
partyUserGroupService.update(userByGroupIdAndUserId);
}
}
@ -211,7 +239,7 @@ public class PartyGroupServiceImpl extends BaseServiceImpl<PartyGroupDao, PartyG
@Override
public List<UserDTO> getUserList(Long deptId) {
Result<List<UserDTO>> userList = userFeignClient.getUserList(deptId);
if(!userList.success() || userList.getData()==null){
if (!userList.success() || userList.getData() == null) {
throw new RenException("获取用户列表信息失败");
}
return userList.getData();
@ -233,15 +261,20 @@ public class PartyGroupServiceImpl extends BaseServiceImpl<PartyGroupDao, PartyG
public Result joinGroup(PartyUserJoinGroupFormDTO partyUserJoinGroupFormDTO) {
//判断是够已加入党群
PartyUserGroupDTO userByGroupIdAndUserId = partyUserGroupService.getUserByGroupIdAndUserId(partyUserJoinGroupFormDTO.getPartyGroupId(), partyUserJoinGroupFormDTO.getUserId());
if(userByGroupIdAndUserId!=null){
if (userByGroupIdAndUserId != null) {
return new Result().error("用户已加入此群!");
}
PartyUserGroupDTO partyUserGroupDTO = ConvertUtils.sourceToTarget(partyUserJoinGroupFormDTO,PartyUserGroupDTO.class);
partyUserGroupDTO.setIdentityFlag("0");
PartyUserGroupDTO partyUserGroupDTO = ConvertUtils.sourceToTarget(partyUserJoinGroupFormDTO, PartyUserGroupDTO.class);
//身份标识为群成员
partyUserGroupDTO.setIdentityFlag("2");
partyUserGroupDTO.setState(0);
partyUserGroupService.save(partyUserGroupDTO);
return new Result();
}
@Override
public PartyGroupDTO getPartyGroupDTOByName(String partyGroupName) {
return baseDao.getPartyGroupDTOByName(partyGroupName);
}
}

3
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyUserGroupServiceImpl.java

@ -209,7 +209,8 @@ public class PartyUserGroupServiceImpl extends BaseServiceImpl<PartyUserGroupDao
//获取之前的群主信息
PartyUserGroupDTO managerByGroupId = getManagerByGroupId(partyUserGroupDTO.getPartyGroupId());
if(managerByGroupId!=null){
managerByGroupId.setIdentityFlag("0");
//更新为群成员
managerByGroupId.setIdentityFlag("2");
updateById(ConvertUtils.sourceToTarget(managerByGroupId,PartyUserGroupEntity.class));
}
}

7
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyGroupDao.xml

@ -56,7 +56,7 @@
t.UPDATED_TIME,
t1.NICKNAME
from epdc_party_group t
left join (select PARTY_GROUP_ID,NICKNAME from epdc_party_user_group where IDENTITY_FLAG = '1' and DEL_FLAG='0' and STATE='0') t1 on t.ID = t1.PARTY_GROUP_ID
left join (select PARTY_GROUP_ID,NICKNAME from epdc_party_user_group where IDENTITY_FLAG = '0' and DEL_FLAG='0' and STATE='0') t1 on t.ID = t1.PARTY_GROUP_ID
where t.DEL_FLAG ='0'
order by CREATED_TIME desc
</select>
@ -84,7 +84,7 @@
t1.NICKNAME,
t1.USER_ID
from epdc_party_group t
left join (select PARTY_GROUP_ID,NICKNAME,USER_ID from epdc_party_user_group where IDENTITY_FLAG = '1' and DEL_FLAG='0' and STATE='0') t1 on t.ID = t1.PARTY_GROUP_ID
left join (select PARTY_GROUP_ID,NICKNAME,USER_ID from epdc_party_user_group where IDENTITY_FLAG = '0' and DEL_FLAG='0' and STATE='0') t1 on t.ID = t1.PARTY_GROUP_ID
where t.DEL_FLAG ='0' and t.ID = #{id}
</select>
@ -99,4 +99,7 @@
left join epdc_party_user_group t1 on t1.PARTY_GROUP_ID = t.ID and t1.DEL_FLAG ='0' and t1.USER_ID=#{userId}
where t.DEL_FLAG ='0' and t.STATE ='0' order by t.CREATED_TIME desc
</select>
<select id="getPartyGroupDTOByName" resultType="com.elink.esua.epdc.dto.PartyGroupDTO">
select ID from epdc_party_group where PARTY_GROUP_NAME = #{partyGroupName} and DEL_FLAG='0' limit 1;
</select>
</mapper>

46
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyGroupOfficialsDao.xml

@ -23,35 +23,39 @@
<result property="allDeptNames" column="ALL_DEPT_NAMES"/>
<result property="parentDeptIds" column="PARENT_DEPT_IDS"/>
<result property="parentDeptNames" column="PARENT_DEPT_NAMES"/>
<result property="partyGroupName" column="PARTY_GROUP_NAME"/>
<result property="gridId" column="GRID_ID"/>
</resultMap>
<select id="selectListOfPartyGroupOfficialsDTO" resultMap="partyGroupOfficialsMap">
select ID,
PARTY_GROUP_ID,
NAME,
MOBILE,
MOTTO,
DUTY,
FACE_IMG,
AREA_RESPONSIBILITY,
DEL_FLAG,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME
from epdc_party_group_officials
where DEL_FLAG ='0'
<if test="partyGroupId!=null and partyGroupId != ''">
PARTY_GROUP_ID = #{partyGroupId}
select
t.ID,
t.PARTY_GROUP_ID,
t.NAME,
t.MOBILE,
t.MOTTO,
t.DUTY,
t.FACE_IMG,
t.AREA_RESPONSIBILITY,
t.DEL_FLAG,
t.REVISION,
t.CREATED_BY,
t.CREATED_TIME,
t.UPDATED_BY,
t.UPDATED_TIME,
t1.PARTY_GROUP_NAME
from epdc_party_group_officials t
left join epdc_party_group t1 on t.PARTY_GROUP_ID = t1.ID and t1.DEL_FLAG='0'
where t.DEL_FLAG ='0'
<if test="groupId!=null and groupId != ''">
and t.PARTY_GROUP_ID = #{groupId}
</if>
<if test="gridId != null and gridId != ''">
AND (GRID_ID = #{gridId}
OR find_in_set(#{gridId},ALL_DEPT_IDS))
AND (t.GRID_ID = #{gridId}
OR find_in_set(#{gridId},t.ALL_DEPT_IDS))
</if>
order by CREATED_TIME desc
order by t.CREATED_TIME desc
</select>

4
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyUserGroupDao.xml

@ -46,7 +46,7 @@
UPDATED_BY,
UPDATED_TIME
from epdc_party_user_group
where DEL_FLAG='0' and PARTY_GROUP_ID = #{groupId} and IDENTITY_FLAG = '1'
where DEL_FLAG='0' and PARTY_GROUP_ID = #{groupId} and IDENTITY_FLAG = '0'
</select>
<select id="getUserByGroupIdAndUserId" resultType="com.elink.esua.epdc.dto.PartyUserGroupDTO">
@ -184,7 +184,7 @@
GRID,DATEDIFF(BANNED_END_TIME,BANNED_START_TIME) as bannedTime from epdc_party_user_group)a
where DEL_FLAG='0'
and PARTY_GROUP_ID = #{partyGroupId}
order by CREATED_TIME desc
order by IDENTITY_FLAG,CREATED_TIME desc
LIMIT #{pageIndex},#{pageSize}
</select>
<select id="selectOneOfPartyUserGroup" resultType="com.elink.esua.epdc.dto.result.PartyUserGroupResultDTO">

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

@ -190,4 +190,16 @@ public class UserController {
public Result<List<UserDTO>> getUserList(@PathVariable("deptId") Long deptId) {
return userService.getUserList(deptId);
}
/**
* @Description 获取已认证未删除用户列表分页列表
* @Author songyunpeng
* @Date 2020/6/1
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.UserDTO>>
**/
@GetMapping("getUserListPage")
public Result<PageData<UserDTO>> getUserListPage(@RequestParam Map<String, Object> params) {
PageData<UserDTO> page = userService.getUserListPage(params);
return new Result<PageData<UserDTO>>().ok(page); }
}

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

@ -18,7 +18,6 @@
package com.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.CachingUserInfoDTO;
import com.elink.esua.epdc.dto.UserDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUnauthorizedAmountFromDTO;
@ -205,4 +204,12 @@ public interface UserDao extends BaseDao<UserEntity> {
* @return java.util.List<com.elink.esua.epdc.dto.UserDTO>
**/
List<UserDTO> getUserList(Long deptId);
/**
* @Description 获取指定部门下未删除已认证用户列表分页
* @Author songyunpeng
* @Date 2020/6/5
* @Param [params]
* @return java.util.List<com.elink.esua.epdc.dto.UserDTO>
**/
List<UserDTO> getUserListPage(Map<String, Object> params);
}

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

@ -314,4 +314,12 @@ public interface UserService extends BaseService<UserEntity> {
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.UserDTO>>
**/
Result<List<UserDTO>> getUserList(Long deptId);
/**
* @Description 获取已认证未删除用户列表分页
* @Author songyunpeng
* @Date 2020/6/5
* @Param [params]
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.UserDTO>
**/
PageData<UserDTO> getUserListPage(Map<String, Object> params);
}

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

@ -1021,4 +1021,11 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
return new Result<List<UserDTO>>().ok(list);
}
@Override
public PageData<UserDTO> getUserListPage(Map<String, Object> params) {
IPage<UserDTO> page = getPage(params);
List<UserDTO> list = baseDao.getUserListPage(params);
return new PageData<>(list, page.getTotal());
}
}

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

@ -504,5 +504,64 @@
select ID,NICKNAME,MOBILE,PARTY_FLAG,FACE_IMG from epdc_user
where DEL_FLAG = '0' and STATE != '0' and FIND_IN_SET( #{deptId}, ALL_DEPT_IDS )
</select>
<select id="getUserListPage" resultType="com.elink.esua.epdc.dto.UserDTO">
select ID,
NICKNAME,
MOBILE,
PASSWORD,
REGISTER_TIME,
FACE_IMG,
SEX,
BIRTHDAY,
EMAIL,
TELEPHONE,
ZIP_CODE,
PROFESSION,
HOBBIES,
USER_SIGN,
INVITATION_CODE,
LAST_LOGIN_TIME,
LAST_LOGIN_IP,
LAST_LONGITUDE,
LAST_LATITUDE,
REAL_NAME,
IDENTITY_NO,
ROAD,
VILLAGE_NAME,
DWELLING_PLACE,
ADDRESS,
WX_OPEN_ID,
WX_UNION_ID,
PARTY_FLAG,
REGISTER_WAY,
REGISTER_SOURCE,
MOBILE_PROVINCE,
MOBILE_CITY,
MOBILE_CARRIER,
POINTS,
POINTS_TOTLE,
INVITE_USER_ID,
STATE,
DEL_FLAG,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME,
LAST_NAME,
FIRST_NAME,
REMARK,
DEPT_ID,
PARENT_DEPT_IDS,
PARENT_DEPT_NAMES,
ALL_DEPT_IDS,
ALL_DEPT_NAMES
from epdc_user
where DEL_FLAG = '0' and STATE != '0' and FIND_IN_SET( #{deptId}, ALL_DEPT_IDS )
<if test="mobile!=null and mobile != ''">
and MOBILE like concat('%',#{mobile},'%')
</if>
</select>
</mapper>

Loading…
Cancel
Save