Skip to content

Commit

Permalink
feat: update query
Browse files Browse the repository at this point in the history
  • Loading branch information
Kang1221 committed Sep 26, 2024
1 parent 2c6ea55 commit 4d92e07
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main/java/co/orange/ddanzi/service/ItemService.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -185,10 +185,6 @@ private List<SelectedOption> setSelectedOptionList(Order order){
return selectedOptionList;
}

public Integer getMyItemCount(User user){
return itemRepository.countAllBySeller(user);
}

public List<MyItem> getMyItemList(User user){
List<Item> itemList = itemRepository.findAllBySeller(user);
List<MyItem> myItemList = new ArrayList<>();
Expand Down

0 comments on commit 4d92e07

Please sign in to comment.