Browse Source

服务热线中剔除已被禁用的工作人员

master
Jackwang 3 years ago
parent
commit
de6ff34324
  1. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java
  2. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java
  3. 3
      epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml

4
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java

@ -127,7 +127,9 @@ public interface CustomerStaffDao extends BaseDao<CustomerStaffEntity> {
* @Author sun
* @Description 根据staffId集合查询工作人员基础信息
**/
List<StaffListResultDTO> selectStaffByIds(@Param("staffIdList") List<String> staffIdList);
List<StaffListResultDTO> selectStaffByIds(@Param("staffIdList") List<String> staffIdList,
@Param("enableFlag") String enableFlag);
/**
* @param staffId

9
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java

@ -22,10 +22,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.entity.DataScope;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.constant.*;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.ExceptionUtils;
@ -512,7 +509,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
@Override
public CustomerStaffListResultDTO getCustomerStaffList(List<String> staffIdList) {
//1:批量查询人员基本信息
List<StaffListResultDTO> staffList = baseDao.selectStaffByIds(staffIdList);
List<StaffListResultDTO> staffList = baseDao.selectStaffByIds(staffIdList,null);
//2:批量查询人员拥有的所有角色信息
List<CustomerStaffRoleResultDTO> roleList = staffRoleDao.selectStaffRoleList(staffIdList);
CustomerStaffListResultDTO list = new CustomerStaffListResultDTO();
@ -843,7 +840,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
//3.查询工作人员基础信息
List<String> staffIdList = staffRoleList.stream().map(GridMobileListResultDTO.Role::getStaffId).collect(Collectors.toList());
staffIdList = staffIdList.stream().distinct().collect(Collectors.toList());
List<StaffListResultDTO> list = baseDao.selectStaffByIds(staffIdList);
List<StaffListResultDTO> list = baseDao.selectStaffByIds(staffIdList, Constant.ENABLE);
//4.封装数据并返回
resultList = ConvertUtils.sourceToTarget(list, GridMobileListResultDTO.class);

3
epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml

@ -191,6 +191,9 @@
customer_staff
WHERE
del_flag = '0'
<if test="enableFlag != null and enableFlag != ''">
and ENABLE_FLAG = #{enableFlag}
</if>
<foreach item="userId" collection="staffIdList" separator="OR" open="AND (" close=")" index="">
user_id = #{userId}
</foreach>

Loading…
Cancel
Save