Skip to content

Commit

Permalink
Merge pull request #51 from hightuv/아이템상세보기-리뷰버그-수정
Browse files Browse the repository at this point in the history
아이템상세보기 리뷰버그 수정
  • Loading branch information
moonwonki authored May 10, 2024
2 parents f728d4c + 7bbaabd commit e474417
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import com.example.WebOrder.dto.ItemDto;
import com.example.WebOrder.service.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
Expand Down Expand Up @@ -43,6 +45,7 @@ public String getWholeMenuByOwner(Model model){
@GetMapping("/admin/item/detail/{itemId}")
public String getMenuByOwner(@PathVariable("itemId") Long itemId, Model model) {
model.addAttribute("itemInfo", itemService.getItemInfoById(itemId));
model.addAttribute("reviewList", reviewService.getReviewsOfItem(itemId, PageRequest.of(0, 10, Sort.Direction.DESC, "id")));
return "item/itemDetail";
}

Expand Down

0 comments on commit e474417

Please sign in to comment.