Skip to content

Commit

Permalink
chore: delete unnecessary query
Browse files Browse the repository at this point in the history
  • Loading branch information
Kang1221 committed Sep 26, 2024
1 parent 4d92e07 commit a93d083
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/main/java/co/orange/ddanzi/service/MyPageService.java
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
package co.orange.ddanzi.service;

import co.orange.ddanzi.common.exception.PaymentNotFoundException;
import co.orange.ddanzi.domain.order.Order;
import co.orange.ddanzi.domain.order.Payment;
import co.orange.ddanzi.domain.product.Discount;
import co.orange.ddanzi.domain.product.Product;
import co.orange.ddanzi.domain.user.User;
import co.orange.ddanzi.dto.common.ProductInfo;
import co.orange.ddanzi.dto.mypage.*;
import co.orange.ddanzi.common.response.ApiResponse;
import co.orange.ddanzi.common.response.Success;
import co.orange.ddanzi.global.jwt.AuthUtils;
import co.orange.ddanzi.repository.DiscountRepository;
import co.orange.ddanzi.repository.InterestProductRepository;
import co.orange.ddanzi.repository.OrderRepository;
import co.orange.ddanzi.repository.PaymentRepository;
import jakarta.transaction.Transactional;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -62,11 +54,10 @@ public ApiResponse<?> getMyOrder(){
@Transactional
public ApiResponse<?> getMyItem(){
User user = authUtils.getUser();
Integer totalCount = itemService.getMyItemCount(user);
List<MyItem> myItemList = itemService.getMyItemList(user);

MyItemResponseDto responseDto = MyItemResponseDto.builder()
.totalCount(totalCount)
.totalCount(myItemList.size())
.itemProductList(myItemList)
.build();
return ApiResponse.onSuccess(Success.GET_MY_ITEM_LIST_SUCCESS, responseDto);
Expand Down

0 comments on commit a93d083

Please sign in to comment.