浏览代码

Merge remote-tracking branch 'origin/Payment-Configuration' into Payment-Configuration

yys 1 月之前
父节点
当前提交
df919dc326
共有 1 个文件被更改,包括 13 次插入0 次删除
  1. 13 0
      fs-company-app/src/main/java/com/fs/app/controller/FsUserCourseVideoController.java

+ 13 - 0
fs-company-app/src/main/java/com/fs/app/controller/FsUserCourseVideoController.java

@@ -399,6 +399,19 @@ public class FsUserCourseVideoController extends AppBaseController {
     @PostMapping("/batchSendCourse")
     public R batchSendCourse(@RequestBody BatchSendCourseDTO batchSendCourseDTO) throws JsonProcessingException {
 
+        // 发送前校验时间 最多一个月
+        if(batchSendCourseDTO.getSendTime()!=null){
+            if(batchSendCourseDTO.getSendTime().getTime()>System.currentTimeMillis()+30L*24*60*60*1000){
+                return R.error("发课时间请勿选择超过一个月的日期");
+            }
+        }
+
+        if(batchSendCourseDTO.getUrgeTime()!=null){
+            if(batchSendCourseDTO.getUrgeTime().getTime()>System.currentTimeMillis()+30L*24*60*60*1000){
+                return R.error("催课时间请勿选择超过一个月的日期");
+            }
+        }
+
         // 生成看课短链
         FsCourseLinkCreateParam fsCourseLinkCreateParam = new FsCourseLinkCreateParam();
         BeanUtils.copyProperties(batchSendCourseDTO, fsCourseLinkCreateParam);