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