| | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 用户议题报表 服务实现类 |
| | |
| | | @Override |
| | | public IPage<UserTopicsVO> selectUserTopicsPage(IPage<UserTopicsVO> page, UserTopicsVO userTopics) { |
| | | if (StringUtils.isNotBlank(userTopics.getDistrictId())) { |
| | | List<String> longs = JSON.parseArray(userTopics.getDistrictId()).toJavaList(String.class); |
| | | IDistrictService bean = SpringUtils.getBean(IDistrictService.class); |
| | | DistrictEntity one = bean.getOne(Wrappers.<DistrictEntity>lambdaQuery().eq(DistrictEntity::getId, userTopics.getDistrictId())); |
| | | if (one != null) { |
| | | userTopics.setAoiCode(one.getAoiCode()); |
| | | List<DistrictEntity> list = bean.list(Wrappers.<DistrictEntity>lambdaQuery().in(DistrictEntity::getId, longs)); |
| | | List<String> collect = list.stream().map(item -> |
| | | item.getAoiCode() |
| | | ).collect(Collectors.toList()); |
| | | if (collect != null) { |
| | | userTopics.setAoiCodeList(collect); |
| | | } |
| | | } |
| | | return page.setRecords(baseMapper.selectUserTopicsPage(page, userTopics)); |