diff --git a/src/main/java/co/orange/ddanzi/service/ItemService.java b/src/main/java/co/orange/ddanzi/service/ItemService.java index f502e53..16041ce 100644 --- a/src/main/java/co/orange/ddanzi/service/ItemService.java +++ b/src/main/java/co/orange/ddanzi/service/ItemService.java @@ -106,7 +106,7 @@ public ApiResponse getItem(String itemId){ return ApiResponse.onFailure(Error.ITEM_UNAUTHORIZED_USER, null); //get latest order - Order order = orderRepository.findLatestOrderByItem(item).orElse(null); + Order order = orderRepository.findByItemAnAndStatus(item).orElse(null); Payment payment = null; if(order!=null) @@ -185,10 +185,6 @@ private List setSelectedOptionList(Order order){ return selectedOptionList; } - public Integer getMyItemCount(User user){ - return itemRepository.countAllBySeller(user); - } - public List getMyItemList(User user){ List itemList = itemRepository.findAllBySeller(user); List myItemList = new ArrayList<>();