|
@@ -20,15 +20,15 @@ import com.yonge.cooleshow.biz.dal.enums.CourseScheduleEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.MessageTypeEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.course.CourseTypeEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.service.*;
|
|
|
-import com.yonge.cooleshow.biz.dal.wordfilter.WordFilter;
|
|
|
-import com.yonge.cooleshow.common.constant.SysConfigConstant;
|
|
|
-import com.yonge.cooleshow.common.enums.YesOrNoEnum;
|
|
|
-import com.yonge.toolset.mybatis.support.PageUtil;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.CourseHomeworkDetailVo;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.CourseHomeworkVo;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.CourseScheduleHomeworkVo;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.StudentHomeworkVo;
|
|
|
+import com.yonge.cooleshow.biz.dal.wordfilter.WordFilter;
|
|
|
+import com.yonge.cooleshow.common.constant.SysConfigConstant;
|
|
|
+import com.yonge.cooleshow.common.enums.YesOrNoEnum;
|
|
|
import com.yonge.toolset.base.exception.BizException;
|
|
|
+import com.yonge.toolset.mybatis.support.PageUtil;
|
|
|
import com.yonge.toolset.thirdparty.message.MessageSenderPluginContext;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -39,7 +39,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
-import java.text.MessageFormat;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -272,6 +271,10 @@ public class CourseHomeworkServiceImpl extends ServiceImpl<CourseHomeworkDao, Co
|
|
|
if (paymentList.isEmpty()) {
|
|
|
return;
|
|
|
}
|
|
|
+ MessageTypeEnum messageType = MessageTypeEnum.TEACHER_DECORATE_HOMEWORK;
|
|
|
+ if(CourseTypeEnum.valueOf(courseSchedule.getType()) == CourseTypeEnum.VIP){
|
|
|
+ messageType = MessageTypeEnum.TEACHER_DECORATE_HOMEWORK_VIP;
|
|
|
+ }
|
|
|
SysUser teacher = sysUserFeignService.queryUserById(courseSchedule.getTeacherId());
|
|
|
// String url = sysMessageService.selectConfigUrl(MessageTypeEnum.TEACHER_DECORATE_HOMEWORK.getCode(),courseSchedule.getId());
|
|
|
for (CourseScheduleStudentPayment courseScheduleStudentPayment : paymentList) {
|
|
@@ -281,14 +284,13 @@ public class CourseHomeworkServiceImpl extends ServiceImpl<CourseHomeworkDao, Co
|
|
|
|
|
|
try {
|
|
|
sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG,
|
|
|
- MessageTypeEnum.TEACHER_DECORATE_HOMEWORK,
|
|
|
+ messageType,
|
|
|
studentReceivers,
|
|
|
new String[]{courseSchedule.getId().toString()},
|
|
|
null,
|
|
|
0 ,
|
|
|
ClientEnum.STUDENT.getCode(),
|
|
|
- teacher.getUsername(),
|
|
|
- CourseTypeEnum.valueOf(courseSchedule.getType()).getMsg());
|
|
|
+ teacher.getUsername());
|
|
|
} catch (Exception e) {
|
|
|
log.warn("老师布置作业消息发送失败 学生id:{}",student.getId());
|
|
|
}
|
|
@@ -350,10 +352,14 @@ public class CourseHomeworkServiceImpl extends ServiceImpl<CourseHomeworkDao, Co
|
|
|
SysUser student = sysUserFeignService.queryUserById(courseHomeworkDetailVo.getStudentId());
|
|
|
SysUser teacher = sysUserFeignService.queryUserById(courseHomeworkDetailVo.getTeacherId());
|
|
|
Map<Long,String> studentReceivers = new HashMap<>();
|
|
|
+ MessageTypeEnum messageType = MessageTypeEnum.TEACHER_REVIEW_HOMEWORK;
|
|
|
+ if(courseHomeworkDetailVo.getCourseType() == CourseScheduleEnum.VIP){
|
|
|
+ messageType = MessageTypeEnum.TEACHER_REVIEW_HOMEWORK_VIP;
|
|
|
+ }
|
|
|
studentReceivers.put(student.getId(), student.getPhone());
|
|
|
// String url = sysMessageService.selectConfigUrl(MessageTypeEnum.TEACHER_REVIEW_HOMEWORK.getCode(),reviewDto.getCourseScheduleId());
|
|
|
sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG,
|
|
|
- MessageTypeEnum.TEACHER_REVIEW_HOMEWORK,
|
|
|
+ messageType,
|
|
|
studentReceivers,
|
|
|
new String[]{reviewDto.getCourseScheduleId().toString()},
|
|
|
null,
|