视频模块
parent
fb9a01a958
commit
ca6ab99830
|
@ -1,5 +1,6 @@
|
||||||
package doctor.controller;
|
package doctor.controller;
|
||||||
|
|
||||||
|
import doctor.common.core.domain.HealthR;
|
||||||
import doctor.common.core.domain.R;
|
import doctor.common.core.domain.R;
|
||||||
import doctor.domain.entity.UserVideoBuyEntity;
|
import doctor.domain.entity.UserVideoBuyEntity;
|
||||||
import doctor.domain.entity.UserVideoCollectionEntity;
|
import doctor.domain.entity.UserVideoCollectionEntity;
|
||||||
|
@ -24,34 +25,34 @@ public class UserVideoController {
|
||||||
|
|
||||||
//用户视频收藏列表
|
//用户视频收藏列表
|
||||||
@GetMapping("/findVideoCollectionList")
|
@GetMapping("/findVideoCollectionList")
|
||||||
public R<List<UserVideoCollectionEntity>>findVideoCollectionList(){
|
public HealthR<List<UserVideoCollectionEntity>>findVideoCollectionList(){
|
||||||
List<UserVideoCollectionEntity> userVideoCollectionList =userVideoService.findVideoCollectionList();
|
List<UserVideoCollectionEntity> userVideoCollectionList =userVideoService.findVideoCollectionList();
|
||||||
return R.ok(userVideoCollectionList);
|
return HealthR.ok(userVideoCollectionList);
|
||||||
}
|
}
|
||||||
//用户取消视频收藏
|
//用户取消视频收藏
|
||||||
@GetMapping("/cancelVideoCollection/{id}")
|
@GetMapping("/cancelVideoCollection/{id}")
|
||||||
public R cancelVideoCollection(@PathVariable Integer id){
|
public HealthR cancelVideoCollection(@PathVariable Integer id){
|
||||||
userVideoService.cancelVideoCollection(id);
|
userVideoService.cancelVideoCollection(id);
|
||||||
return R.ok();
|
return HealthR.ok();
|
||||||
}
|
}
|
||||||
//用户购买视频列表
|
//用户购买视频列表
|
||||||
@GetMapping("/findUserVideoBuyList")
|
@GetMapping("/findUserVideoBuyList")
|
||||||
public R<List<UserVideoBuyEntity>>findUserVideoBuyList(){
|
public HealthR<List<UserVideoBuyEntity>>findUserVideoBuyList(){
|
||||||
List<UserVideoBuyEntity> userVideoBuys =userVideoService.findUserVideoBuyList();
|
List<UserVideoBuyEntity> userVideoBuys =userVideoService.findUserVideoBuyList();
|
||||||
return R.ok(userVideoBuys);
|
return HealthR.ok(userVideoBuys);
|
||||||
}
|
}
|
||||||
//用户删除购买的视频
|
//用户删除购买的视频
|
||||||
@DeleteMapping("/deleteVideoBuy/{id}")
|
@DeleteMapping("/deleteVideoBuy/{id}")
|
||||||
public R deleteVideoBuy(@PathVariable Integer id){
|
public HealthR deleteVideoBuy(@PathVariable Integer id){
|
||||||
userVideoService.deleteVideoBuy(id);
|
userVideoService.deleteVideoBuy(id);
|
||||||
return R.ok();
|
return HealthR.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
//我的钱包
|
//我的钱包
|
||||||
@GetMapping("/findUserWallet")
|
@GetMapping("/findUserWallet")
|
||||||
public R<List<UserWalletEntity>> findUserWallet(){
|
public HealthR<List<UserWalletEntity>> findUserWallet(){
|
||||||
List<UserWalletEntity> userWallets = userVideoService.findUserWallet();
|
List<UserWalletEntity> userWallets = userVideoService.findUserWallet();
|
||||||
return R.ok(userWallets);
|
return HealthR.ok(userWallets);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package doctor.controller;
|
package doctor.controller;
|
||||||
|
|
||||||
|
import doctor.common.core.domain.HealthR;
|
||||||
import doctor.common.core.domain.R;
|
import doctor.common.core.domain.R;
|
||||||
import doctor.domain.entity.*;
|
import doctor.domain.entity.*;
|
||||||
import doctor.service.VideoService;
|
import doctor.service.VideoService;
|
||||||
|
@ -21,21 +22,21 @@ public class VideoController {
|
||||||
private VideoService videoService;
|
private VideoService videoService;
|
||||||
//收藏健康讲堂视频列表
|
//收藏健康讲堂视频列表
|
||||||
@PostMapping("/verify/v1/addUserVideoCollection")
|
@PostMapping("/verify/v1/addUserVideoCollection")
|
||||||
public R addUserVideoCollection(@RequestBody UserVideoCollectionEntity userVideoCollection){
|
public HealthR addUserVideoCollection(@RequestBody UserVideoCollectionEntity userVideoCollection){
|
||||||
videoService.addUserVideoCollection(userVideoCollection);
|
videoService.addUserVideoCollection(userVideoCollection);
|
||||||
return R.ok();
|
return HealthR.ok();
|
||||||
}
|
}
|
||||||
//购买健康讲堂视频
|
//购买健康讲堂视频
|
||||||
@PostMapping("/verify/v1/videoBuy")
|
@PostMapping("/verify/v1/videoBuy")
|
||||||
public R videoBuy(@RequestBody UserVideoBuyEntity userVideoBuy){
|
public HealthR videoBuy(@RequestBody UserVideoBuyEntity userVideoBuy){
|
||||||
videoService.videoBuy(userVideoBuy);
|
videoService.videoBuy(userVideoBuy);
|
||||||
return R.ok();
|
return HealthR.ok();
|
||||||
}
|
}
|
||||||
//视频评论列表
|
//视频评论列表
|
||||||
@GetMapping("/v1/findVideoCommentList")
|
@GetMapping("/v1/findVideoCommentList")
|
||||||
public R<List<VideoComment>> findVideoCommentList(){
|
public HealthR<List<VideoComment>> findVideoCommentList(){
|
||||||
List<VideoComment> videoCommentList = videoService.findVideoCommentList();
|
List<VideoComment> videoCommentList = videoService.findVideoCommentList();
|
||||||
return R.ok(videoCommentList);
|
return HealthR.ok(videoCommentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue