|
1 | 1 | package com.jangburich.domain.store.service;
|
2 | 2 |
|
3 |
| -import com.jangburich.domain.store.dto.StoreTeamResponse; |
4 |
| -import com.jangburich.domain.store.dto.response.StoreSearchDetailsResponse; |
5 | 3 | import java.time.LocalDate;
|
6 | 4 | import java.time.LocalDateTime;
|
7 | 5 | import java.util.ArrayList;
|
|
35 | 33 | import com.jangburich.domain.store.domain.StoreTeam;
|
36 | 34 | import com.jangburich.domain.store.domain.StoreUpdateRequestDTO;
|
37 | 35 | import com.jangburich.domain.store.dto.StoreTeamResponse;
|
38 |
| -import com.jangburich.domain.store.dto.condition.StoreSearchCondition; |
39 |
| -import com.jangburich.domain.store.dto.condition.StoreSearchConditionWithType; |
40 | 36 | import com.jangburich.domain.store.dto.response.OrdersDetailResponse;
|
41 | 37 | import com.jangburich.domain.store.dto.response.OrdersGetResponse;
|
42 | 38 | import com.jangburich.domain.store.dto.response.OrdersTodayResponse;
|
@@ -215,13 +211,13 @@ public StoreGetResponseDTO getStoreInfo(String authentication) {
|
215 | 211 |
|
216 | 212 | public List<com.jangburich.domain.store.dto.StoreTeamResponse> getPaymentGroup(String userId) {
|
217 | 213 | User user = userRepository.findByProviderId(userId)
|
218 |
| - .orElseThrow(() -> new DefaultNullPointerException(ErrorCode.INVALID_AUTHENTICATION)); |
| 214 | + .orElseThrow(() -> new DefaultNullPointerException(ErrorCode.INVALID_AUTHENTICATION)); |
219 | 215 |
|
220 | 216 | Owner owner = ownerRepository.findByUser(user)
|
221 |
| - .orElseThrow(() -> new DefaultNullPointerException(ErrorCode.INVALID_AUTHENTICATION)); |
| 217 | + .orElseThrow(() -> new DefaultNullPointerException(ErrorCode.INVALID_AUTHENTICATION)); |
222 | 218 |
|
223 | 219 | Store store = storeRepository.findByOwner(owner)
|
224 |
| - .orElseThrow(() -> new DefaultNullPointerException(ErrorCode.INVALID_AUTHENTICATION)); |
| 220 | + .orElseThrow(() -> new DefaultNullPointerException(ErrorCode.INVALID_AUTHENTICATION)); |
225 | 221 |
|
226 | 222 | return storeTeamRepository.findAllByStore(store)
|
227 | 223 | .stream()
|
@@ -273,10 +269,11 @@ public PaymentGroupDetailResponse getPaymentGroupDetail(String userId, Long team
|
273 | 269 | for (Cart cart : cartRepository.findAllByOrders(order)) {
|
274 | 270 | price += cart.getMenu().getPrice();
|
275 | 271 | }
|
276 |
| - return new OrderResponse(order.getUser().getName(), order.getUpdatedAt(), String.valueOf(price)); |
| 272 | + return new OrderResponse(order.getId(), order.getUser().getName(), order.getUpdatedAt(), |
| 273 | + String.valueOf(price)); |
277 | 274 | }).toList();
|
278 | 275 |
|
279 |
| - return PaymentGroupDetailResponse.create(team.getName(), storeTeam.getPoint(), storeTeam.getRemainPoint(), |
| 276 | + return PaymentGroupDetailResponse.create(team, storeTeam.getPoint(), storeTeam.getRemainPoint(), |
280 | 277 | teamLeader, orderResponse);
|
281 | 278 | }
|
282 | 279 |
|
|
0 commit comments