Browse Source

keyWord

feature/evaluate
yinzuomei 3 years ago
parent
commit
276de3e411
  1. 4
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/ListStaffFormDTO.java
  2. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerStaffDao.java
  3. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  4. 6
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml

4
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/ListStaffFormDTO.java

@ -26,8 +26,8 @@ public class ListStaffFormDTO implements Serializable {
public interface Staff extends CustomerClientShowGroup {} public interface Staff extends CustomerClientShowGroup {}
/** /**
* 手机号 * 姓名或者手机号
* 可以不填 * 可以不填
*/ */
private String mobile; private String keyWord;
} }

2
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerStaffDao.java

@ -55,7 +55,7 @@ public interface CustomerStaffDao extends BaseDao<CustomerStaffEntity> {
*/ */
List<ListStaffResultDTO> selectByRealName(@Param("customerId") String customerId, List<ListStaffResultDTO> selectByRealName(@Param("customerId") String customerId,
@Param("realName") String realName, @Param("realName") String realName,
@Param("mobile") String mobile); @Param("keyWord") String keyWord);
/** /**
* @Description 分页查询排好序的工作人员Id列表 * @Description 分页查询排好序的工作人员Id列表

2
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -537,7 +537,7 @@ public class EpmetUserServiceImpl implements EpmetUserService {
@Override @Override
public List<ListStaffResultDTO> listStaff(ListStaffFormDTO formDTO) { public List<ListStaffResultDTO> listStaff(ListStaffFormDTO formDTO) {
//1.模糊查询用户、角色信息 //1.模糊查询用户、角色信息
List<ListStaffResultDTO> resultList = customerStaffDao.selectByRealName(formDTO.getCustomerId(), formDTO.getRealName(),formDTO.getMobile()); List<ListStaffResultDTO> resultList = customerStaffDao.selectByRealName(formDTO.getCustomerId(), formDTO.getRealName(),formDTO.getKeyWord());
if (null == resultList || resultList.size() < NumConstant.ONE) { if (null == resultList || resultList.size() < NumConstant.ONE) {
return new ArrayList<>(); return new ArrayList<>();
} }

6
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml

@ -52,8 +52,10 @@
<if test='null != realName and "" !=realName'> <if test='null != realName and "" !=realName'>
AND real_name LIKE CONCAT('%', #{realName}, '%') AND real_name LIKE CONCAT('%', #{realName}, '%')
</if> </if>
<if test='null != mobile and "" !=mobile'> <if test='null != keyWord and "" !=keyWord'>
and MOBILE LIKE CONCAT('%', #{mobile}, '%') AND (REAL_NAME LIKE CONCAT('%', #{keyWord}, '%')
or MOBILE LIKE CONCAT('%', #{keyWord}, '%')
)
</if> </if>
</select> </select>

Loading…
Cancel
Save