反馈历史
This commit is contained in:
@@ -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<String, String> data, @RequestParam("file") MultipartFile file, @PathVariable("type") String type) throws Exception {
|
||||
return success(gorseService.bulkUserOrItem(data, file, type));
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -70,7 +70,7 @@ public class GorseService {
|
||||
}
|
||||
|
||||
public List<Feedback> 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<String> getRecommend(String userId) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user