diff --git a/api/src/main/java/com/wx/application/adapter/controller/GorseController.java b/api/src/main/java/com/wx/application/adapter/controller/GorseController.java index 62d2be0..0763a9f 100644 --- a/api/src/main/java/com/wx/application/adapter/controller/GorseController.java +++ b/api/src/main/java/com/wx/application/adapter/controller/GorseController.java @@ -121,6 +121,11 @@ public class GorseController extends BaseController { return success(gorseService.getRecommendByUser(gQo.getUserId(), gQo.getRecommendation(), gQo.getCategory(), gQo.getN())); } + @GetMapping(value = "/get_feedback_list/{userId}/{type}") + public ResponseData getFeedbackList(@PathVariable("userId") String userId, @PathVariable("type") String type) throws Exception { + return success(gorseService.listFeedback(userId, type)); + } + @PutMapping(value = "/bulk/{type}") public ResponseData bulkUserOrItem(@RequestParam Map data, @RequestParam("file") MultipartFile file, @PathVariable("type") String type) throws Exception { return success(gorseService.bulkUserOrItem(data, file, type)); diff --git a/api/src/main/java/com/wx/application/gorse4j/Feedback.java b/api/src/main/java/com/wx/application/gorse4j/Feedback.java index ef69985..7d7783c 100644 --- a/api/src/main/java/com/wx/application/gorse4j/Feedback.java +++ b/api/src/main/java/com/wx/application/gorse4j/Feedback.java @@ -12,15 +12,17 @@ public class Feedback { private String userId; private String itemId; private String timestamp; + private Item item; public Feedback() { } - public Feedback(String feedbackType, String userId, String itemId, String timestamp) { + public Feedback(String feedbackType, String userId, String itemId, String timestamp, Item item) { this.feedbackType = feedbackType; this.userId = userId; this.itemId = itemId; this.timestamp = timestamp; + this.item = item; } @JsonProperty("FeedbackType") @@ -38,6 +40,11 @@ public class Feedback { return itemId; } + @JsonProperty("Item") + public Item getItem() { + return item; + } + @JsonProperty("Timestamp") public String getTimestamp() { return timestamp; diff --git a/api/src/main/java/com/wx/application/gorse4j/GorseService.java b/api/src/main/java/com/wx/application/gorse4j/GorseService.java index bb00737..a4b3f26 100644 --- a/api/src/main/java/com/wx/application/gorse4j/GorseService.java +++ b/api/src/main/java/com/wx/application/gorse4j/GorseService.java @@ -70,7 +70,7 @@ public class GorseService { } public List listFeedback(String userId, String feedbackType) throws IOException { - return Arrays.asList(this.request("GET", this.endpoint + "/api/user/" + userId + "/feedback/" + feedbackType, null, Feedback[].class)); + return Arrays.asList(this.request("GET", this.endpoint + "/api/dashboard/user/" + userId + "/feedback/" + feedbackType, null, Feedback[].class)); } public List getRecommend(String userId) throws IOException { diff --git a/web/src/components/menus/UserManage.vue b/web/src/components/menus/UserManage.vue index fce3a63..57e7772 100644 --- a/web/src/components/menus/UserManage.vue +++ b/web/src/components/menus/UserManage.vue @@ -40,11 +40,14 @@