| | |
| | | @RequestMapping(value = "/actStore") |
| | | @ResponseBody |
| | | public Object actStore(Integer id) { |
| | | List<Integer> collect1 = Arrays.asList(id); |
| | | //课程 |
| | | List<Integer> list = coursePackagePaymentClient.queryPaymentCoursePackage(collect1); |
| | | //场地 |
| | | List<SiteBooking> list1 = siteBookingService.list(new QueryWrapper<SiteBooking>().in("storeId", collect1).eq("state", 1)); |
| | | List<Integer> collect = list1.stream().map(SiteBooking::getAppUserId).collect(Collectors.toList()); |
| | | list.addAll(collect); |
| | | //赛事 |
| | | List<Integer> list2 = competitionClient.queryAppUserId(collect1); |
| | | list.addAll(list2); |
| | | //门票 |
| | | |
| | | HashMap<String, Object> map = competitionClient.actPt(list); |
| | | |
| | | List<TStore> lists = storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getOperatorId, 0).ne(TStore::getState, 3)); |
| | | long l1=0; |
| | | for (TStore tStore : lists) { |
| | | l1 += getStoreOperatingHours(tStore, new Date()); |
| | | if (Integer.valueOf(3).equals(UserExt.getUser().getObjectType())) { |
| | | id = UserExt.getUser().getObjectId(); |
| | | } else { |
| | | id = resolveStoreId(id); |
| | | } |
| | | map.put("allHour",l1); |
| | | TStore store = id == null ? null : storeService.getById(id); |
| | | CompetionVO competionVO = new CompetionVO(); |
| | | if (store == null || !Integer.valueOf(1).equals(store.getState())) { |
| | | competionVO.setStoreIds(Collections.singletonList(-1)); |
| | | } else { |
| | | List<Integer> storeIds = Collections.singletonList(store.getId()); |
| | | competionVO.setStoreIds(storeIds); |
| | | } |
| | | HashMap<String, Object> map = competitionClient.actStore(competionVO); |
| | | map.put("allHour", store == null || !Integer.valueOf(1).equals(store.getState()) |
| | | ? 0 : getStoreOperatingHours(store, new Date())); |
| | | return map; |
| | | } |
| | | |