add UserCollectInfo intro

main
wangqing 10 months ago
parent 746660ca8f
commit c293d155f6

@ -95,7 +95,7 @@ public class JournalController {
journalRespDTO.setId(article.getId()); journalRespDTO.setId(article.getId());
journalRespDTO.setJournalNo(article.getVolid()); journalRespDTO.setJournalNo(article.getVolid());
journalRespDTO.setTitle(article.getTitle()); journalRespDTO.setTitle(article.getTitle());
journalRespDTO.setImage(Constants.MUSIC_RESOURCE_PREFIX + article.getImage()); journalRespDTO.setImage(Constants.MUSIC_RESOURCE_PREFIX + article.getImage());
journalRespDTO.setDate(getEditDate(article)); journalRespDTO.setDate(getEditDate(article));
journalRespDTO.setHaveCollect(journalCollectSet.contains(journalRespDTO.getId())); journalRespDTO.setHaveCollect(journalCollectSet.contains(journalRespDTO.getId()));
return journalRespDTO; return journalRespDTO;

@ -20,18 +20,18 @@ public class UserCollectInfoController extends BaseController {
@Autowired @Autowired
private UserCollectInfoService userCollectInfoService; private UserCollectInfoService userCollectInfoService;
//
@PostMapping("/save") // @PostMapping("/save")
public Result save(){ // public Result save(){
userCollectInfoService.save(); // userCollectInfoService.save();
return Result.success(); // return Result.success();
} // }
//
@GetMapping("/show") // @GetMapping("/show")
public Result show(){ // public Result show(){
UserCollectInfo userCollectInfo =userCollectInfoService.findByUserId("111222"); // UserCollectInfo userCollectInfo =userCollectInfoService.findByUserId("111222");
return Result.success(userCollectInfo); // return Result.success(userCollectInfo);
} // }
// //
// @PutMapping("/unCollect") // @PutMapping("/unCollect")
// public Result unCollect() { // public Result unCollect() {
@ -62,12 +62,11 @@ public class UserCollectInfoController extends BaseController {
if("song".equals(type)) { if("song".equals(type)) {
userCollectInfoService.collectSong(userid,id); userCollectInfoService.collectSong(userid,id);
} }
return Result.success(); return Result.success();
} }
/** /**
* typejournal typesong * typejournal typesong
*/ */
@PostMapping("/unCollect/{type}/{id}") @PostMapping("/unCollect/{type}/{id}")
public Result unCollect(@PathVariable String type,@PathVariable String id) { public Result unCollect(@PathVariable String type,@PathVariable String id) {

Loading…
Cancel
Save