|
@@ -1,6 +1,7 @@
|
|
|
package cn.reghao.tnb.content.app.vod.service;
|
|
package cn.reghao.tnb.content.app.vod.service;
|
|
|
|
|
|
|
|
import cn.reghao.file.api.iface.OssService;
|
|
import cn.reghao.file.api.iface.OssService;
|
|
|
|
|
+import cn.reghao.jutil.jdk.result.Result;
|
|
|
import cn.reghao.tnb.common.auth.UserContext;
|
|
import cn.reghao.tnb.common.auth.UserContext;
|
|
|
import cn.reghao.tnb.content.api.constant.VideoErrorType;
|
|
import cn.reghao.tnb.content.api.constant.VideoErrorType;
|
|
|
import cn.reghao.tnb.content.api.constant.VideoStatus;
|
|
import cn.reghao.tnb.content.api.constant.VideoStatus;
|
|
@@ -30,10 +31,10 @@ public class VideoService {
|
|
|
this.videoErrorMapper = videoErrorMapper;
|
|
this.videoErrorMapper = videoErrorMapper;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public void errorReport(VideoErrorReport videoErrorReport) {
|
|
|
|
|
|
|
+ public Result errorReport(VideoErrorReport videoErrorReport) {
|
|
|
long loginUser = UserContext.getUser();
|
|
long loginUser = UserContext.getUser();
|
|
|
if (loginUser > 10005) {
|
|
if (loginUser > 10005) {
|
|
|
- return;
|
|
|
|
|
|
|
+ return Result.fail("no permission");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
String videoId = videoErrorReport.getVideoId();
|
|
String videoId = videoErrorReport.getVideoId();
|
|
@@ -53,12 +54,13 @@ public class VideoService {
|
|
|
videoStatus = VideoStatus.hasAd.getValue();
|
|
videoStatus = VideoStatus.hasAd.getValue();
|
|
|
break;
|
|
break;
|
|
|
default:
|
|
default:
|
|
|
- return;
|
|
|
|
|
|
|
+ return Result.fail("unknown errorType");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
videoPostMapper.updateVideoStatus(videoId, videoStatus);
|
|
videoPostMapper.updateVideoStatus(videoId, videoStatus);
|
|
|
VideoError videoError = new VideoError(videoErrorReport);
|
|
VideoError videoError = new VideoError(videoErrorReport);
|
|
|
videoErrorMapper.save(videoError);
|
|
videoErrorMapper.save(videoError);
|
|
|
|
|
+ return Result.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public String getShareLink(String videoId) {
|
|
public String getShareLink(String videoId) {
|