视频模块

cbx
chenbingxuan 2024-01-13 09:13:39 +08:00
parent fb9a01a958
commit ca6ab99830
2 changed files with 18 additions and 16 deletions

View File

@ -1,5 +1,6 @@
package doctor.controller;
import doctor.common.core.domain.HealthR;
import doctor.common.core.domain.R;
import doctor.domain.entity.UserVideoBuyEntity;
import doctor.domain.entity.UserVideoCollectionEntity;
@ -24,34 +25,34 @@ public class UserVideoController {
//用户视频收藏列表
@GetMapping("/findVideoCollectionList")
public R<List<UserVideoCollectionEntity>>findVideoCollectionList(){
public HealthR<List<UserVideoCollectionEntity>>findVideoCollectionList(){
List<UserVideoCollectionEntity> userVideoCollectionList =userVideoService.findVideoCollectionList();
return R.ok(userVideoCollectionList);
return HealthR.ok(userVideoCollectionList);
}
//用户取消视频收藏
@GetMapping("/cancelVideoCollection/{id}")
public R cancelVideoCollection(@PathVariable Integer id){
public HealthR cancelVideoCollection(@PathVariable Integer id){
userVideoService.cancelVideoCollection(id);
return R.ok();
return HealthR.ok();
}
//用户购买视频列表
@GetMapping("/findUserVideoBuyList")
public R<List<UserVideoBuyEntity>>findUserVideoBuyList(){
public HealthR<List<UserVideoBuyEntity>>findUserVideoBuyList(){
List<UserVideoBuyEntity> userVideoBuys =userVideoService.findUserVideoBuyList();
return R.ok(userVideoBuys);
return HealthR.ok(userVideoBuys);
}
//用户删除购买的视频
@DeleteMapping("/deleteVideoBuy/{id}")
public R deleteVideoBuy(@PathVariable Integer id){
public HealthR deleteVideoBuy(@PathVariable Integer id){
userVideoService.deleteVideoBuy(id);
return R.ok();
return HealthR.ok();
}
//我的钱包
@GetMapping("/findUserWallet")
public R<List<UserWalletEntity>> findUserWallet(){
public HealthR<List<UserWalletEntity>> findUserWallet(){
List<UserWalletEntity> userWallets = userVideoService.findUserWallet();
return R.ok(userWallets);
return HealthR.ok(userWallets);
}

View File

@ -1,5 +1,6 @@
package doctor.controller;
import doctor.common.core.domain.HealthR;
import doctor.common.core.domain.R;
import doctor.domain.entity.*;
import doctor.service.VideoService;
@ -21,21 +22,21 @@ public class VideoController {
private VideoService videoService;
//收藏健康讲堂视频列表
@PostMapping("/verify/v1/addUserVideoCollection")
public R addUserVideoCollection(@RequestBody UserVideoCollectionEntity userVideoCollection){
public HealthR addUserVideoCollection(@RequestBody UserVideoCollectionEntity userVideoCollection){
videoService.addUserVideoCollection(userVideoCollection);
return R.ok();
return HealthR.ok();
}
//购买健康讲堂视频
@PostMapping("/verify/v1/videoBuy")
public R videoBuy(@RequestBody UserVideoBuyEntity userVideoBuy){
public HealthR videoBuy(@RequestBody UserVideoBuyEntity userVideoBuy){
videoService.videoBuy(userVideoBuy);
return R.ok();
return HealthR.ok();
}
//视频评论列表
@GetMapping("/v1/findVideoCommentList")
public R<List<VideoComment>> findVideoCommentList(){
public HealthR<List<VideoComment>> findVideoCommentList(){
List<VideoComment> videoCommentList = videoService.findVideoCommentList();
return R.ok(videoCommentList);
return HealthR.ok(videoCommentList);
}
}