| | |
| | | .eq("cityCode", cityCode) |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据城市code获取用户的id集合 |
| | | * @param cityCode 城市code |
| | | * @return |
| | | */ |
| | | @PostMapping("/appUser/getAppUserIds") |
| | | public List<Integer> getAppUserIds(@RequestBody String cityCode){ |
| | | List<TAppUser> list = appUserService.list(new QueryWrapper<TAppUser>().eq("cityCode", cityCode).eq("state", 1)); |
| | | return list.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据省市名称所有用户 |
| | | * @param appUserIdsByCityName |
| | | * @return |
| | | */ |
| | | @PostMapping("/appUser/getAppUserIdsByCityName") |
| | | public List<Integer> getAppUserIdsByCityName(@RequestBody AppUserIdsByCityName appUserIdsByCityName){ |
| | | QueryWrapper<TAppUser> queryWrapper = new QueryWrapper<TAppUser>().eq("state", 1); |
| | | if(ToolUtil.isNotEmpty(appUserIdsByCityName.getProvince())){ |
| | | queryWrapper.like("province", appUserIdsByCityName.getProvince()); |
| | | } |
| | | if(ToolUtil.isNotEmpty(appUserIdsByCityName.getCity())){ |
| | | queryWrapper.like("city", appUserIdsByCityName.getCity()); |
| | | } |
| | | List<TAppUser> list = appUserService.list(queryWrapper); |
| | | return list.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | } |
| | | } |