class CityItemReadService implements CityItemReadFacade {

    @Override
    public ICResponse<Paging<CityItemInfoDTO>> paging(CityItemPagingRequest request) {
        if(request==null){
            throw new IllegalArgumentException("request is null");
        }
        request.checkParam();
        ICResponse<Paging<CityItemInfo>> cityItemDate = cityItemReadFacade.paging(request);
        if (cityItemDate.isSuccess() && CollectionUtils.isNotEmpty(cityItemDate.getResult().getData())) {
            List<CityItemInfo> data = cityItemDate.getResult().getData();
            //装配城市信息
            List<CityItemInfoDTO> itemInfoDTOList = data.stream().map(t -> {
                CityItemInfoDTO itemInfoDTO = new CityItemInfoDTO();
                BeanUtils.copyProperties(t, itemInfoDTO);
                return itemInfoDTO;
            }).collect(Collectors.toList());

            itemManager.filledRelationCityForCityItem(itemInfoDTOList);
            itemManager.filCategoryInfoForCityItem(itemInfoDTOList);
            Paging<CityItemInfoDTO> pageResult = new Paging<>();
            pageResult.setTotal(cityItemDate.getResult().getTotal());

            pageResult.setData(itemInfoDTOList);
            return ICResponse.ok(pageResult);
        }
        return ICResponse.ok(Paging.empty());
    }

}