|
|
|
@ -20,18 +20,18 @@ public class UserCollectInfoController extends BaseController {
|
|
|
|
|
@Autowired
|
|
|
|
|
private UserCollectInfoService userCollectInfoService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/save")
|
|
|
|
|
public Result save(){
|
|
|
|
|
userCollectInfoService.save();
|
|
|
|
|
return Result.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("/show")
|
|
|
|
|
public Result show(){
|
|
|
|
|
UserCollectInfo userCollectInfo =userCollectInfoService.findByUserId("111222");
|
|
|
|
|
return Result.success(userCollectInfo);
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
// @PostMapping("/save")
|
|
|
|
|
// public Result save(){
|
|
|
|
|
// userCollectInfoService.save();
|
|
|
|
|
// return Result.success();
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// @GetMapping("/show")
|
|
|
|
|
// public Result show(){
|
|
|
|
|
// UserCollectInfo userCollectInfo =userCollectInfoService.findByUserId("111222");
|
|
|
|
|
// return Result.success(userCollectInfo);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// @PutMapping("/unCollect")
|
|
|
|
|
// public Result unCollect() {
|
|
|
|
@ -62,12 +62,11 @@ public class UserCollectInfoController extends BaseController {
|
|
|
|
|
if("song".equals(type)) {
|
|
|
|
|
userCollectInfoService.collectSong(userid,id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Result.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 收藏 type为journal 为期刊,type为song为单曲
|
|
|
|
|
* 取消收藏 type为journal 为期刊,type为song为单曲
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping("/unCollect/{type}/{id}")
|
|
|
|
|
public Result unCollect(@PathVariable String type,@PathVariable String id) {
|
|
|
|
|