|
@@ -10,6 +10,7 @@ import com.fs.common.core.domain.model.LoginUser;
|
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
|
import com.fs.common.enums.BusinessType;
|
|
import com.fs.common.enums.BusinessType;
|
|
|
import com.fs.common.utils.ServletUtils;
|
|
import com.fs.common.utils.ServletUtils;
|
|
|
|
|
+import com.fs.common.utils.date.DateUtil;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
import com.fs.course.config.CourseConfig;
|
|
import com.fs.course.config.CourseConfig;
|
|
|
import com.fs.course.domain.FsUserCourse;
|
|
import com.fs.course.domain.FsUserCourse;
|
|
@@ -20,6 +21,7 @@ import com.fs.course.param.BatchVideoSvae;
|
|
|
import com.fs.course.param.CourseVideoUpdates;
|
|
import com.fs.course.param.CourseVideoUpdates;
|
|
|
import com.fs.course.service.IFsUserCourseService;
|
|
import com.fs.course.service.IFsUserCourseService;
|
|
|
import com.fs.course.service.IFsUserCourseVideoService;
|
|
import com.fs.course.service.IFsUserCourseVideoService;
|
|
|
|
|
+import com.fs.course.service.IFsUserCourseVideoTaskService;
|
|
|
import com.fs.course.vo.FsUserCourseVideoChooseVO;
|
|
import com.fs.course.vo.FsUserCourseVideoChooseVO;
|
|
|
import com.fs.framework.web.service.TokenService;
|
|
import com.fs.framework.web.service.TokenService;
|
|
|
import com.fs.his.vo.OptionsVO;
|
|
import com.fs.his.vo.OptionsVO;
|
|
@@ -31,9 +33,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
-import java.util.HashMap;
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 课堂视频Controller
|
|
* 课堂视频Controller
|
|
@@ -57,6 +57,8 @@ public class FsUserCourseVideoController extends BaseController
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ISysConfigService configService;
|
|
private ISysConfigService configService;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IFsUserCourseVideoTaskService fsUserCourseVideoTaskService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 查询课堂视频列表
|
|
* 查询课堂视频列表
|
|
@@ -147,6 +149,12 @@ public class FsUserCourseVideoController extends BaseController
|
|
|
@PutMapping
|
|
@PutMapping
|
|
|
public AjaxResult edit(@RequestBody FsUserCourseVideo fsUserCourseVideo)
|
|
public AjaxResult edit(@RequestBody FsUserCourseVideo fsUserCourseVideo)
|
|
|
{
|
|
{
|
|
|
|
|
+ if (Objects.nonNull(fsUserCourseVideo.getPlanReleaseTime())) {
|
|
|
|
|
+ if (DateUtil.compareTime(fsUserCourseVideo.getPlanReleaseTime(), new Date())) {
|
|
|
|
|
+ return AjaxResult.error("发布时间必须大于当前时间");
|
|
|
|
|
+ }
|
|
|
|
|
+ return toAjax(fsUserCourseVideoTaskService.addTask(fsUserCourseVideo));
|
|
|
|
|
+ }
|
|
|
return toAjax(fsUserCourseVideoService.updateFsUserCourseVideo(fsUserCourseVideo));
|
|
return toAjax(fsUserCourseVideoService.updateFsUserCourseVideo(fsUserCourseVideo));
|
|
|
}
|
|
}
|
|
|
|
|
|