| | |
| | | IncomeQuery incomeQuery = new IncomeQuery(); |
| | | // 场地预约记录查询query |
| | | SiteBookingQuery siteBookingQuery = new SiteBookingQuery(); |
| | | // 筛选运营商的是时候使用 |
| | | List<Integer> storeIds = new ArrayList<>(); |
| | | // 根据运营商ID 查询运营商下的所有门店 |
| | | if (storeId==null){ |
| | | if (operatorId!=null){ |
| | | List<TStore> stores = storeService.list(new QueryWrapper<TStore>().eq("operatorId", operatorId)); |
| | | // 拿到该运营商下的门店id集合 |
| | | List<Integer> storeIds = stores.stream().map(TStore::getId).collect(Collectors.toList()); |
| | | storeIds = stores.stream().map(TStore::getId).collect(Collectors.toList()); |
| | | query.setStoresIds(storeIds); |
| | | siteBookingQuery.setStoreIds(storeIds); |
| | | competitionQuery.setOperatorId(operatorId); |
| | | } |
| | | }else { |
| | | List<Integer> list = new ArrayList<>(); |
| | | list.add(storeId); |
| | | query.setStoresIds(list); |
| | | siteBookingQuery.setStoreIds(list); |
| | | competitionQuery.setStoreId(storeId); |
| | | } |
| | | |
| | | |
| | |
| | | incomeVOS.add(temp); |
| | | } |
| | | // 预约场地 |
| | | if (operatorId!=null){ |
| | | if (siteBookingQuery.getStoreIds().size()==0){ |
| | | // 说明当前运营商下没有门店 |
| | | if (operatorId!=null && storeIds.size()==0){ |
| | | }else{ |
| | | List<SiteBooking> siteBookings = siteClient.listAll(siteBookingQuery); |
| | | for (SiteBooking siteBooking : siteBookings) { |
| | |
| | | } |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // 积分商品 |