| | |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.StudentClient; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.communityWorldCup.Model.StoreIds; |
| | | import com.dsh.course.feignClient.communityWorldCup.WorldCupClient; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.feignClient.competition.model.ListQuery; |
| | | import com.dsh.course.feignClient.course.CoursePackageClient; |
| | |
| | | private ISiteBookingService siteBookingService; |
| | | @Autowired |
| | | private BallClient ballClient; |
| | | @Autowired |
| | | private WorldCupClient worldCupClient; |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | |
| | | List<Integer> ids = new ArrayList<>(); |
| | | |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | List<Integer> storeIds = new ArrayList<>(); |
| | | storeIds.add(UserExt.getUser().getObjectId()); |
| | | ListQuery listQuery = new ListQuery(); |
| | | listQuery.setIds(storeIds); |
| | | // 赛事 |
| | | List<Integer> list = competitionClient.getUserIds(listQuery); |
| | | // 获取场地预约记录 拿到用户ids |
| | | List<Integer> siteUsers = siteBookingService.list(new QueryWrapper<SiteBooking>().in("storeId", storeIds)) |
| | | .stream().map(SiteBooking::getAppUserId).collect(Collectors.toList()); |
| | | // 获取课程购买记录 拿到用户ids |
| | | List<Integer> cpUsers = coursePackageClient.getCoursePackageByStoreIds(storeIds); |
| | | // 获取游戏记录 拿到用户ids |
| | | List<Integer> gameUsers = ballClient.getGameByStoreIds(storeIds); |
| | | // 世界杯参与记录 拿到用户ids |
| | | StoreIds req = new StoreIds(); |
| | | req.setStoreIds(storeIds); |
| | | List<Integer> studentIds = worldCupClient.getStudentIds(req); |
| | | // 用户ids |
| | | List<Integer> users = new ArrayList<>(); |
| | | users.addAll(list); |
| | | users.addAll(siteUsers); |
| | | users.addAll(cpUsers); |
| | | users.addAll(gameUsers); |
| | | users.addAll(studentIds); |
| | | // 去重后的用户id |
| | | List<Integer> collect = users.stream().distinct().collect(Collectors.toList()); |
| | | ids = appUserClient.getUserStore(UserExt.getUser().getObjectId()); |
| | | ids.addAll(collect); |
| | | List<Integer> collect1 = ids.stream().distinct().collect(Collectors.toList()); |
| | | if(ids.size()==0){ |
| | | ids.add(-1); |
| | | } |
| | | search.setIds(ids); |
| | | search.setIds(collect1); |
| | | } |
| | | if(UserExt.getUser().getObjectType()==2){ |
| | | // 获取运营商下的所有门店id集合 |
| | |
| | | List<Integer> cpUsers = coursePackageClient.getCoursePackageByStoreIds(storeIds); |
| | | // 获取游戏记录 拿到用户ids |
| | | List<Integer> gameUsers = ballClient.getGameByStoreIds(storeIds); |
| | | // 世界杯参与记录 拿到学员ids |
| | | StoreIds req = new StoreIds(); |
| | | req.setStoreIds(storeIds); |
| | | List<Integer> studentIds = worldCupClient.getStudentIds(req); |
| | | // 用户ids |
| | | List<Integer> users = new ArrayList<>(); |
| | | users.addAll(list); |
| | | users.addAll(siteUsers); |
| | | users.addAll(cpUsers); |
| | | users.addAll(gameUsers); |
| | | users.addAll(studentIds); |
| | | // 去重后的用户id |
| | | List<Integer> collect = users.stream().distinct().collect(Collectors.toList()); |
| | | ids = appUserClient.getUserYYs(UserExt.getUser().getObjectId()); |
| | |
| | | @RequestMapping("/listcom/{id}") |
| | | @ResponseBody |
| | | public List<Map<String,Object>> listcom(@PathVariable("id") Integer id) { |
| | | |
| | | List<Map<String,Object>> maps = studentClient.listCom(id); |
| | | |
| | | List<Map<String,Object>> maps = studentClient.listCom(id); |
| | | return maps; |
| | | } |
| | | |