|
|
@@ -42,6 +42,7 @@ import com.fs.course.param.newfs.FsUserCourseAddCompanyUserParam;
|
|
|
import com.fs.course.param.newfs.FsUserCourseVideoLinkParam;
|
|
|
import com.fs.course.param.newfs.FsUserCourseVideoUParam;
|
|
|
import com.fs.course.param.newfs.UserCourseVideoPageParam;
|
|
|
+import com.fs.course.service.IFsCourseLinkService;
|
|
|
import com.fs.course.service.IFsUserCompanyBindService;
|
|
|
import com.fs.course.service.IFsUserCompanyUserService;
|
|
|
import com.fs.course.service.IFsUserCourseVideoService;
|
|
|
@@ -86,14 +87,8 @@ import com.volcengine.helper.VodUploadProgressListener;
|
|
|
import com.volcengine.model.beans.Functions;
|
|
|
import com.volcengine.service.vod.IVodService;
|
|
|
import com.volcengine.service.vod.model.business.VodUrlUploadURLSet;
|
|
|
-import com.volcengine.service.vod.model.request.VodGetMediaInfosRequest;
|
|
|
-import com.volcengine.service.vod.model.request.VodQueryUploadTaskInfoRequest;
|
|
|
-import com.volcengine.service.vod.model.request.VodUploadMediaRequest;
|
|
|
-import com.volcengine.service.vod.model.request.VodUrlUploadRequest;
|
|
|
-import com.volcengine.service.vod.model.response.VodCommitUploadInfoResponse;
|
|
|
-import com.volcengine.service.vod.model.response.VodGetMediaInfosResponse;
|
|
|
-import com.volcengine.service.vod.model.response.VodQueryUploadTaskInfoResponse;
|
|
|
-import com.volcengine.service.vod.model.response.VodUrlUploadResponse;
|
|
|
+import com.volcengine.service.vod.model.request.*;
|
|
|
+import com.volcengine.service.vod.model.response.*;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.redisson.api.RLock;
|
|
|
@@ -259,6 +254,9 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
@Autowired
|
|
|
private RedisTemplate redisTemplate;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IFsCourseLinkService linkService;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 查询课堂视频
|
|
|
@@ -977,26 +975,46 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
return R.error(567, "群聊通用链接").put("qwExternalId", contact.getId());
|
|
|
}
|
|
|
}
|
|
|
- if ("今正科技".equals(cloudHostProper.getCompanyName())) {
|
|
|
- QwExternalContact UnionEXt = qwExternalContactMapper.selectQwExternalByUnionID(user.getUnionId());
|
|
|
- if (UnionEXt != null) {
|
|
|
- log.info("匹配到的第一个企微用户:" + UnionEXt.getUserId());
|
|
|
- log.info("企微id:" + UnionEXt.getId());
|
|
|
- log.info("用户:" + param.getVideoId());
|
|
|
- log.info("企微用户:" + param.getQwUserId());
|
|
|
- param.setQwExternalId(UnionEXt.getId());
|
|
|
- FsCourseWatchLog log = courseWatchLogMapper.getWatchCourseVideoByExt(UnionEXt.getId(), param.getVideoId(), param.getQwUserId());
|
|
|
- if (log == null) {
|
|
|
- param.setUserId(user.getUserId());
|
|
|
- createWatchLog(param);
|
|
|
- } else {
|
|
|
- if (log.getUserId() == null || log.getUserId().equals(0L) || !log.getUserId().equals(param.getUserId())) {
|
|
|
- log.setUserId(param.getUserId());
|
|
|
+
|
|
|
+ boolean bool1 = "今正科技".equals(cloudHostProper.getCompanyName());
|
|
|
+ boolean bool2 = "弘珍医药".equals(cloudHostProper.getCompanyName());
|
|
|
+ if (bool1 || bool2) {
|
|
|
+ //一个都找不到
|
|
|
+ List<QwExternalContact> qwExternalContactList = qwExternalContactMapper.selectQwExternalByUnionID(user.getUnionId());
|
|
|
+
|
|
|
+ if (qwExternalContactList != null && !qwExternalContactList.isEmpty()) {
|
|
|
+ QwExternalContact UnionEXt = qwExternalContactList.get(0);
|
|
|
+ for (QwExternalContact qwExternalContact : qwExternalContactList) {
|
|
|
+ if (qwExternalContact.getFsUserId() == null || qwExternalContact.getFsUserId() != 0L) {
|
|
|
+ qwExternalContact.setFsUserId(user.getUserId());
|
|
|
+ qwExternalContactMapper.updateQwExternalContact(qwExternalContact);
|
|
|
}
|
|
|
- log.setUpdateTime(new Date());
|
|
|
- courseWatchLogMapper.updateFsCourseWatchLog(log);
|
|
|
+ try {
|
|
|
+ if (qwExternalContact.getQwUserId().equals(Long.parseLong(param.getQwUserId()))) {
|
|
|
+ UnionEXt = qwExternalContact;
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("群聊链接匹配销售失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ log.info("匹配到的第一个企微用户:" + UnionEXt.getUserId());
|
|
|
+ log.info("企微id:" + UnionEXt.getId());
|
|
|
+ log.info("用户:" + param.getVideoId());
|
|
|
+ log.info("企微用户:" + param.getQwUserId());
|
|
|
+ param.setQwExternalId(UnionEXt.getId());
|
|
|
+ FsCourseWatchLog log = courseWatchLogMapper.getWatchCourseVideoByExt(UnionEXt.getId(), param.getVideoId(), param.getQwUserId());
|
|
|
+ if (log == null) {
|
|
|
+ param.setUserId(user.getUserId());
|
|
|
+ createWatchLog(param);
|
|
|
+ } else {
|
|
|
+ if (log.getUserId() == null || log.getUserId().equals(0L) || !log.getUserId().equals(param.getUserId())) {
|
|
|
+ log.setUserId(param.getUserId());
|
|
|
+ }
|
|
|
+ log.setUpdateTime(new Date());
|
|
|
+ courseWatchLogMapper.updateFsCourseWatchLog(log);
|
|
|
+ }
|
|
|
+ return R.error(567, "群聊通用链接").put("qwExternalId", UnionEXt.getId());
|
|
|
}
|
|
|
- return R.error(567, "群聊通用链接").put("qwExternalId", UnionEXt.getId());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -2603,10 +2621,13 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
}
|
|
|
// 项目看课数限制
|
|
|
if (!EXCLUDE_PROJECTS.contains(signProjectName) && !CloudHostUtils.hasCloudHostName("弘德堂")) {
|
|
|
+ log.error("进入了看课限制:传入参数:={},watchCourseVideo={}",param, watchCourseVideo);
|
|
|
Integer logCount = fsUserCourseMapper.selectTodayCourseWatchLogCountByUserIdAndProjectId(param.getUserId(), courseProject);
|
|
|
if (Objects.isNull(watchCourseVideo) && logCount > 0) {
|
|
|
return ResponseResult.fail(504, "超过项目看课数量限制");
|
|
|
}
|
|
|
+ }else {
|
|
|
+ log.error("没有进入看课限制:传入参数:={},watchCourseVideo={}存在问题 ",param, watchCourseVideo);
|
|
|
}
|
|
|
//添加判断:该用户是否已经存在此课程的看课记录,并且看课记录的销售id不是传入的销售id
|
|
|
if (watchCourseVideo != null) {
|
|
|
@@ -4058,8 +4079,8 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
|
|
|
@Override
|
|
|
public R uploadVideoToHuoShanByUrl() {
|
|
|
- List <FsUserCourseVideo> videos = fsUserCourseVideoMapper.selectVideoByHuaWei();
|
|
|
- for (FsUserCourseVideo video : videos){
|
|
|
+ List <FsVideoResource> videos = fsUserCourseVideoMapper.selectVideoByHuaWei();
|
|
|
+ for (FsVideoResource video : videos){
|
|
|
uploadVideoByUrl(video);
|
|
|
}
|
|
|
return R.ok();
|
|
|
@@ -4069,7 +4090,7 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
private IVodService vodService;
|
|
|
|
|
|
//通过Url上传视频
|
|
|
- public void uploadVideoByUrl(FsUserCourseVideo courseVideo) {
|
|
|
+ public void uploadVideoByUrl(FsVideoResource videoResource) {
|
|
|
|
|
|
try {
|
|
|
VodUrlUploadRequest.Builder reqBuilder = VodUrlUploadRequest.newBuilder();
|
|
|
@@ -4077,7 +4098,7 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
reqBuilder.setSpaceName(cloudHostProper.getSpaceName());
|
|
|
VodUrlUploadURLSet.Builder uRLSetsBuilder = VodUrlUploadURLSet.newBuilder();
|
|
|
//源文件 URL
|
|
|
- uRLSetsBuilder.setSourceUrl(courseVideo.getLineTwo());//华为云
|
|
|
+ uRLSetsBuilder.setSourceUrl(videoResource.getLine2());//华为云
|
|
|
//存储类型。默认为 1。取值如下:
|
|
|
//1:标准存储。
|
|
|
//2:归档存储。
|
|
|
@@ -4092,7 +4113,7 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
// String fileName = System.currentTimeMillis() + ".mp4";
|
|
|
// String remoteFileName = "fs/" + datePath + "/" + fileName;
|
|
|
|
|
|
- uRLSetsBuilder.setFileName(courseVideo.getFileKey());
|
|
|
+ uRLSetsBuilder.setFileName(videoResource.getFileKey());
|
|
|
reqBuilder.addURLSets(uRLSetsBuilder);
|
|
|
|
|
|
VodUrlUploadResponse resp = vodService.uploadMediaByUrl(reqBuilder.build());
|
|
|
@@ -4101,11 +4122,11 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
log.info("上传返回异常:{}",resp.getResponseMetadata().getError());
|
|
|
System.exit(-1);
|
|
|
}else {
|
|
|
- FsUserCourseVideo video = new FsUserCourseVideo();
|
|
|
- video.setVideoId(courseVideo.getVideoId());
|
|
|
+ FsVideoResource video = new FsVideoResource();
|
|
|
+ video.setId(videoResource.getId());
|
|
|
video.setJobId(resp.getResult().getData(0).getJobId());
|
|
|
//更新JobId
|
|
|
- fsUserCourseVideoMapper.updateFsUserCourseVideo(video);
|
|
|
+ fsVideoResourceMapper.updateById(video);
|
|
|
}
|
|
|
log.info("上传返回参数:{}",resp);
|
|
|
} catch (Exception e) {
|
|
|
@@ -4116,25 +4137,25 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
@Override
|
|
|
public R getVidByJob() {
|
|
|
// 查询有JobId的视频
|
|
|
- List<FsUserCourseVideo> list = fsUserCourseVideoMapper.selectVideoByJobId();
|
|
|
+ List<FsVideoResource> list = fsUserCourseVideoMapper.selectVideoByJobId();
|
|
|
if (list.isEmpty()) {
|
|
|
log.info("没有待上传的视频任务");
|
|
|
return R.error();
|
|
|
}
|
|
|
// 按五百一批切割
|
|
|
- List<List<FsUserCourseVideo>> batches = splitList(list, 500);
|
|
|
+ List<List<FsVideoResource>> batches = splitList(list, 500);
|
|
|
log.info("总任务 {} 条,分成 {} 批", list.size(), batches.size());
|
|
|
|
|
|
int batchIndex = 1;
|
|
|
|
|
|
// 批次顺序执行,每批内部多线程并发执行
|
|
|
- for (List<FsUserCourseVideo> batch : batches) {
|
|
|
+ for (List<FsVideoResource> batch : batches) {
|
|
|
|
|
|
log.info("开始执行批次 {}/{},本批任务 {} 条", batchIndex, batches.size(), batch.size());
|
|
|
|
|
|
CountDownLatch latch = new CountDownLatch(batch.size());
|
|
|
|
|
|
- for (FsUserCourseVideo video : batch) {
|
|
|
+ for (FsVideoResource video : batch) {
|
|
|
uploadExecutor.submit(() -> {
|
|
|
try {
|
|
|
uploadSingleTaskWithRetry(video,1);
|
|
|
@@ -4162,25 +4183,25 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
@Override
|
|
|
public R getVideoInfoByVid() {
|
|
|
// 查询有JobId的视频
|
|
|
- List<FsUserCourseVideo> list = fsUserCourseVideoMapper.selectVideoByVid();
|
|
|
+ List<FsVideoResource> list = fsUserCourseVideoMapper.selectVideoByVid();
|
|
|
if (list.isEmpty()) {
|
|
|
log.info("没有包含vid的视频");
|
|
|
return R.error();
|
|
|
}
|
|
|
// 按五百一批切割
|
|
|
- List<List<FsUserCourseVideo>> batches = splitList(list, 500);
|
|
|
+ List<List<FsVideoResource>> batches = splitList(list, 500);
|
|
|
log.info("总任务 {} 条,分成 {} 批", list.size(), batches.size());
|
|
|
|
|
|
int batchIndex = 1;
|
|
|
|
|
|
// 批次顺序执行,每批内部多线程并发执行
|
|
|
- for (List<FsUserCourseVideo> batch : batches) {
|
|
|
+ for (List<FsVideoResource> batch : batches) {
|
|
|
|
|
|
log.info("开始执行批次 {}/{},本批任务 {} 条", batchIndex, batches.size(), batch.size());
|
|
|
|
|
|
CountDownLatch latch = new CountDownLatch(batch.size());
|
|
|
|
|
|
- for (FsUserCourseVideo video : batch) {
|
|
|
+ for (FsVideoResource video : batch) {
|
|
|
uploadExecutor.submit(() -> {
|
|
|
try {
|
|
|
uploadSingleTaskWithRetry(video,2);
|
|
|
@@ -4205,6 +4226,37 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
return R.ok();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public R createRoomMiniLinkByCourse(FsCourseLinkRoomNewParam param) {
|
|
|
+
|
|
|
+ QwUser qwUser = qwUserMapper.selectQwUserById(param.getQwUserId());
|
|
|
+
|
|
|
+ if (qwUser == null || qwUser.getCompanyId() == null || qwUser.getCompanyUserId() == null) {
|
|
|
+ return R.error("员工未绑定 销售公司 或 销售 请先绑定");
|
|
|
+ }
|
|
|
+
|
|
|
+ QwCompany qwCompany = iQwCompanyService.getQwCompanyByRedis(param.getCorpId());
|
|
|
+
|
|
|
+ if (qwCompany == null) {
|
|
|
+ return R.error().put("msg", "企业不存在,请联系管理员");
|
|
|
+ }
|
|
|
+ if (qwCompany.getMiniAppId() == null) {
|
|
|
+ return R.error().put("msg", "当前企业未绑定小程序,请联系管理员");
|
|
|
+ }
|
|
|
+
|
|
|
+ //生成小程序链接
|
|
|
+ String linkByMiniApp = createLinkByMiniApp(new Date(), param.getCourseId(), param.getVideoId(), qwUser, null, 2, null, 1);
|
|
|
+
|
|
|
+ if(StringUtils.isNotEmpty(linkByMiniApp)){
|
|
|
+ linkByMiniApp = linkByMiniApp.replaceAll(".html", "");
|
|
|
+ }
|
|
|
+ String link = linkService.getGotoWxAppLink(linkByMiniApp, qwCompany.getMiniAppId());
|
|
|
+
|
|
|
+ System.out.println("生成课程通链: " + link + " :" + param);
|
|
|
+
|
|
|
+ return R.ok().put("link", link);
|
|
|
+ }
|
|
|
+
|
|
|
private final ExecutorService uploadExecutor = new ThreadPoolExecutor(
|
|
|
8, // core
|
|
|
16, // max
|
|
|
@@ -4231,20 +4283,28 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
}
|
|
|
|
|
|
//根据jobid查询上传视频的vid
|
|
|
- public void getVidByJobId(FsUserCourseVideo courseVideo){
|
|
|
+ public void getVidByJobId(FsVideoResource videoResource){
|
|
|
try {
|
|
|
VodQueryUploadTaskInfoRequest.Builder reqBuilder = VodQueryUploadTaskInfoRequest.newBuilder();
|
|
|
- reqBuilder.setJobIds(courseVideo.getJobId());
|
|
|
+ reqBuilder.setJobIds(videoResource.getJobId());
|
|
|
|
|
|
VodQueryUploadTaskInfoResponse resp = vodService.queryUploadTaskInfo(reqBuilder.build());
|
|
|
if (resp.getResponseMetadata().hasError()) {
|
|
|
System.out.println(resp.getResponseMetadata().getError());
|
|
|
System.exit(-1);
|
|
|
}else {
|
|
|
- FsUserCourseVideo video = new FsUserCourseVideo();
|
|
|
- video.setVideoId(courseVideo.getVideoId());
|
|
|
- video.setVid(resp.getResult().getData().getMediaInfoList(0).getVid());
|
|
|
- fsUserCourseVideoMapper.updateFsUserCourseVideo(video);
|
|
|
+ if (StringUtils.isEmpty(resp.getResult().getData().getMediaInfoList(0).getVid())){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ FsVideoResource video = new FsVideoResource();
|
|
|
+ video.setId(videoResource.getId());
|
|
|
+ //视频上传失败,清空jobid
|
|
|
+ if (StringUtils.isEmpty(resp.getResult().getData().getMediaInfoList(0).getVid())){
|
|
|
+ video.setJobId("");
|
|
|
+ }else {
|
|
|
+ video.setHsyVid(resp.getResult().getData().getMediaInfoList(0).getVid());
|
|
|
+ }
|
|
|
+ fsVideoResourceMapper.updateById(video);
|
|
|
}
|
|
|
System.out.println(resp);
|
|
|
} catch (Exception e) {
|
|
|
@@ -4253,26 +4313,39 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
}
|
|
|
|
|
|
|
|
|
- public void getVideoInfoByVid(FsUserCourseVideo courseVideo) {
|
|
|
+ //根据vid获取视频详情
|
|
|
+ public void getVideoInfoByVid(FsVideoResource videoResource) {
|
|
|
try {
|
|
|
VodGetMediaInfosRequest.Builder reqBuilder = VodGetMediaInfosRequest.newBuilder();
|
|
|
- reqBuilder.setVids(courseVideo.getVid());
|
|
|
+ reqBuilder.setVids(videoResource.getHsyVid());
|
|
|
|
|
|
VodGetMediaInfosResponse resp = vodService.getMediaInfos20230701(reqBuilder.build());
|
|
|
if (resp.getResponseMetadata().hasError()) {
|
|
|
System.out.println(resp.getResponseMetadata().getError());
|
|
|
System.exit(-1);
|
|
|
}else {
|
|
|
- //更新小节
|
|
|
- FsUserCourseVideo video = new FsUserCourseVideo();
|
|
|
- video.setVideoId(courseVideo.getVideoId());
|
|
|
- String url = cloudHostProper.volcengineUrl+"/"+resp.getResult().getMediaInfoList(0).getSourceInfo().getStoreUri();
|
|
|
- video.setLineTwo(url);
|
|
|
- fsUserCourseVideoMapper.updateFsUserCourseVideo(video);
|
|
|
+ //如果路径是空的直接返回
|
|
|
+ if (StringUtils.isEmpty(resp.getResult().getMediaInfoList(0).getSourceInfo().getStoreUri())){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //如果是未发布状态修改发布状态
|
|
|
+ if (resp.getResult().getMediaInfoList(0).getBasicInfo().getPublishStatus().equals("Unpublished")){
|
|
|
+ updateMediaPublishStatus(videoResource.getHsyVid());
|
|
|
+ }
|
|
|
//更新视频资源
|
|
|
- FsVideoResource videoResource = fsVideoResourceMapper.selectByFileKey(courseVideo.getFileKey());
|
|
|
- videoResource.setLine2(url);
|
|
|
- fsVideoResourceMapper.updateById(videoResource);
|
|
|
+ String url = cloudHostProper.volcengineUrl+"/"+resp.getResult().getMediaInfoList(0).getSourceInfo().getStoreUri();
|
|
|
+
|
|
|
+ FsVideoResource fsVideoResource = new FsVideoResource();
|
|
|
+ fsVideoResource.setId(videoResource.getId());
|
|
|
+ fsVideoResource.setLine2(url);
|
|
|
+ fsVideoResourceMapper.updateById(fsVideoResource);
|
|
|
+
|
|
|
+ //更新小节
|
|
|
+ FsUserCourseVideo courseVideo = new FsUserCourseVideo();
|
|
|
+ courseVideo.setFileKey(videoResource.getFileKey());
|
|
|
+ courseVideo.setLineTwo(url);
|
|
|
+ fsUserCourseVideoMapper.updateFsUserCourseVideoByFileKey(courseVideo);
|
|
|
+
|
|
|
}
|
|
|
System.out.println(resp);
|
|
|
} catch (Exception e) {
|
|
|
@@ -4280,24 +4353,44 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //修改发布状态
|
|
|
+ public void updateMediaPublishStatus(String vid){
|
|
|
+ String statusPublished = "Published";
|
|
|
+
|
|
|
+ try {
|
|
|
+ // publish
|
|
|
+ VodUpdateMediaPublishStatusRequest.Builder req = VodUpdateMediaPublishStatusRequest.newBuilder();
|
|
|
+ req.setVid(vid);
|
|
|
+ req.setStatus(statusPublished);
|
|
|
+
|
|
|
+ VodUpdateMediaPublishStatusResponse resp = vodService.updateMediaPublishStatus(req.build());
|
|
|
+ System.out.println(resp);
|
|
|
+
|
|
|
+ Thread.sleep(1000);
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
- public void uploadSingleTaskWithRetry(FsUserCourseVideo courseVideo,Integer type) {
|
|
|
+ public void uploadSingleTaskWithRetry(FsVideoResource videoResource,Integer type) {
|
|
|
int maxRetry = 3;
|
|
|
for (int i = 1; i <= maxRetry; i++) {
|
|
|
try {
|
|
|
if (type == 1){
|
|
|
//获取上传成功的视频vid,同步到数据库
|
|
|
- getVidByJobId(courseVideo);
|
|
|
+ getVidByJobId(videoResource);
|
|
|
}else if (type == 2){
|
|
|
//获取视频地址同步到线路二
|
|
|
- getVideoInfoByVid(courseVideo);
|
|
|
+ getVideoInfoByVid(videoResource);
|
|
|
}
|
|
|
return;
|
|
|
} catch (Exception e) {
|
|
|
log.error("视频 {} 上传失败,第 {} 次重试,原因:{}",
|
|
|
- courseVideo.getVideoId(), i, e.getMessage());
|
|
|
+ videoResource.getId(), i, e.getMessage());
|
|
|
if (i == maxRetry) {
|
|
|
- log.error("视频 {} 上传最终失败!", courseVideo.getVideoId());
|
|
|
+ log.error("视频 {} 上传最终失败!", videoResource.getId());
|
|
|
}
|
|
|
}
|
|
|
}
|