Ver Fonte

Merge remote-tracking branch 'origin/master'

zyp há 1 semana atrás
pai
commit
e1e3278811

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

@@ -329,7 +329,7 @@ public class FsUserCourseVideoController extends AppBaseController {
         R courseSortLink = fsUserCourseService.createAppCourseSortLink(fsCourseLinkCreateParam);
         String url = courseSortLink.get("url").toString();
         batchSendCourseDTO.setUrl(url);
-
+        batchSendCourseDTO.setIsUrgeCourse(false);
         return openIMService.batchSendCourse(batchSendCourseDTO);
     }
 

+ 1 - 1
fs-company/src/main/java/com/fs/user/FsUserAdminController.java

@@ -167,7 +167,7 @@ public class FsUserAdminController extends BaseController {
         R courseSortLink = fsUserCourseService.createAppCourseSortLink(fsCourseLinkCreateParam);
         String url = courseSortLink.get("url").toString();
         batchSendCourseDTO.setUrl(url);
-
+        batchSendCourseDTO.setIsUrgeCourse(false);
         return openIMService.batchSendCourse(batchSendCourseDTO);
     }
 

+ 5 - 1
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java

@@ -1833,7 +1833,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             // 更新观看记录的奖励类
             log.setRewardType(config.getRewardType());
             courseWatchLogMapper.updateFsCourseWatchLog(log);
-            return R.ok("红包发送成功");
+            return R.ok("答题成功!");
         }
 
     }
@@ -2302,6 +2302,10 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
                 companyUserEndDateTime : periodDays.getEndDateTime();
         // 检查时间范围和状态
         log.error("传入参数:开始时间:{},结束时间:{},periodDays={}",effectiveStartTime,effectiveEndTime,periodDays);
+        if (ObjectUtils.isNotEmpty(effectiveStartTime)||ObjectUtils.isNotEmpty(effectiveEndTime)){
+            log.error("请检查营期时间!");
+            return false;
+        }
         return DateUtil.isWithinRangeSafe(LocalDateTime.now(), effectiveStartTime, effectiveEndTime)&& periodDays.getStatus() == 1;
     }
 

+ 3 - 2
fs-service/src/main/java/com/fs/im/service/impl/OpenIMServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.http.HttpRequest;
 import cn.hutool.json.JSONUtil;
 import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -1099,7 +1100,7 @@ public class OpenIMServiceImpl implements OpenIMService {
         FsUserCourse fsUserCourse = fsUserCourseMapper.selectFsUserCourseByCourseId(batchSendCourseDTO.getCourseId());
         Long project = fsUserCourse != null ? fsUserCourse.getProject() : null;
         long planSendTimeStamp;
-        if(batchSendCourseDTO.getSendType() == 1 && batchSendCourseDTO.getSendTime() != null && batchSendCourseDTO.getSendTime().compareTo(new Date()) > 0){
+        if(ObjectUtils.isNotEmpty(batchSendCourseDTO.getSendType())&&batchSendCourseDTO.getSendType() == 1 && batchSendCourseDTO.getSendTime() != null && batchSendCourseDTO.getSendTime().compareTo(new Date()) > 0){
             planSendTimeStamp = batchSendCourseDTO.getSendTime().getTime();
         } else {
             planSendTimeStamp = System.currentTimeMillis();
@@ -1109,7 +1110,7 @@ public class OpenIMServiceImpl implements OpenIMService {
         OpenImBatchMsgDTO openImBatchMsgDTO = makeOpenImBatchMsgDTO(batchSendCourseDTO, courseUrl, objectMapper, userIds, planSendTimeStamp, "发课");
 
         int sendType;
-        if(batchSendCourseDTO.getSendType() == 1 && batchSendCourseDTO.getSendTime() != null && batchSendCourseDTO.getSendTime().compareTo(new Date()) > 0) {
+        if(ObjectUtils.isNotEmpty(batchSendCourseDTO.getSendType())&&batchSendCourseDTO.getSendType() == 1 && batchSendCourseDTO.getSendTime() != null && batchSendCourseDTO.getSendTime().compareTo(new Date()) > 0) {
             sendType = 1; //定时
         } else {
             sendType = 2; //实时