Browse Source

Merge branch 'dev_ic_platform' into develop

master
zhaoqifeng 4 years ago
parent
commit
b26313e6ec
  1. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
  2. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java
  3. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

4
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java

@ -409,9 +409,9 @@ public class IcResiUserController {
* @date 2021/11/3 1:42 下午
*/
@PostMapping("searchbyname")
public Result<List<SearchByNameResultDTO>> searchByName(@RequestBody SearchByNameFormDTO formDTO, @LoginUser TokenDto tokenDto) {
public Result<PageData<SearchByNameResultDTO>> searchByName(@RequestBody SearchByNameFormDTO formDTO, @LoginUser TokenDto tokenDto) {
ValidatorUtils.validateEntity(formDTO, SearchByNameFormDTO.SearchByNameForm.class);
return new Result<List<SearchByNameResultDTO>>().ok(icResiUserService.searchByName(formDTO, tokenDto));
return new Result<PageData<SearchByNameResultDTO>>().ok(icResiUserService.searchByName(formDTO, tokenDto));
}
@NotNull

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java

@ -99,7 +99,7 @@ public interface IcResiUserService extends BaseService<IcResiUserEntity> {
* @author zxc
* @date 2021/11/3 1:42 下午
*/
List<SearchByNameResultDTO> searchByName(SearchByNameFormDTO formDTO,TokenDto tokenDto);
PageData<SearchByNameResultDTO> searchByName(SearchByNameFormDTO formDTO, TokenDto tokenDto);
/**

6
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -570,7 +570,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
* @date 2021/11/3 1:42 下午
*/
@Override
public List<SearchByNameResultDTO> searchByName(SearchByNameFormDTO formDTO, TokenDto tokenDto) {
public PageData<SearchByNameResultDTO> searchByName(SearchByNameFormDTO formDTO, TokenDto tokenDto) {
// 查询工作人员所属组织
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
if (null == staffInfo){
@ -580,7 +580,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
PageInfo<SearchByNameResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.searchByName(formDTO.getName(), staffInfo.getAgencyId(), no));
List<SearchByNameResultDTO> result = pageInfo.getList();
if (CollectionUtils.isEmpty(result)){
return new ArrayList<>();
return new PageData<>(new ArrayList<>(), pageInfo.getTotal());
}
// 查询小区,楼号,网格
Result<List<AllGridsByUserIdResultDTO>> gridResult = govOrgOpenFeignClient.getGridListByGridIds(result.stream().map(SearchByNameResultDTO::getGridId).collect(Collectors.toList()));
@ -605,7 +605,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
item.setBuildNum(buildMap.get(item.getBuildId()));
});
return result;
return new PageData<>(result, pageInfo.getTotal());
}
/**

Loading…
Cancel
Save