|
@@ -2,25 +2,27 @@ package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
-import com.ym.mec.biz.dal.dao.ClassGroupDao;
|
|
|
-import com.ym.mec.biz.dal.dao.CourseScheduleEvaluateDao;
|
|
|
-import com.ym.mec.biz.dal.dao.PracticeGroupDao;
|
|
|
-import com.ym.mec.biz.dal.dao.TeacherDao;
|
|
|
+import com.ym.mec.biz.dal.dao.*;
|
|
|
import com.ym.mec.biz.dal.dto.BasicUserDto;
|
|
|
-import com.ym.mec.biz.dal.dto.PracticeGroupDto;
|
|
|
import com.ym.mec.biz.dal.entity.ClassGroup;
|
|
|
import com.ym.mec.biz.dal.entity.CourseScheduleEvaluate;
|
|
|
import com.ym.mec.biz.dal.entity.PracticeGroup;
|
|
|
+import com.ym.mec.biz.dal.enums.MessageTypeEnum;
|
|
|
import com.ym.mec.biz.service.CourseScheduleEvaluateService;
|
|
|
+import com.ym.mec.biz.service.SysConfigService;
|
|
|
+import com.ym.mec.biz.service.SysMessageService;
|
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
+import com.ym.mec.thirdparty.message.MessageSenderPluginContext.MessageSender;
|
|
|
+import com.ym.mec.util.http.HttpUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.Date;
|
|
|
-import java.util.HashSet;
|
|
|
-import java.util.List;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
|
|
|
@Service
|
|
|
public class CourseScheduleEvaluateServiceImpl extends BaseServiceImpl<Long, CourseScheduleEvaluate> implements CourseScheduleEvaluateService {
|
|
@@ -33,6 +35,10 @@ public class CourseScheduleEvaluateServiceImpl extends BaseServiceImpl<Long, Cou
|
|
|
private TeacherDao teacherDao;
|
|
|
@Autowired
|
|
|
private PracticeGroupDao practiceGroupDao;
|
|
|
+ @Autowired
|
|
|
+ private SysConfigDao sysConfigDao;
|
|
|
+ @Autowired
|
|
|
+ private SysMessageService sysMessageService;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Long, CourseScheduleEvaluate> getDAO() {
|
|
@@ -56,6 +62,17 @@ public class CourseScheduleEvaluateServiceImpl extends BaseServiceImpl<Long, Cou
|
|
|
if (num <= 0) {
|
|
|
throw new BizException("报告添加失败,请重试");
|
|
|
}
|
|
|
+ long practiceGroupId = Long.parseLong(classGroup.getMusicGroupId());
|
|
|
+ PracticeGroup practiceGroup = practiceGroupDao.get(practiceGroupId);
|
|
|
+
|
|
|
+ Map<Integer, String> push = new HashMap<>(1);
|
|
|
+ push.put(practiceGroup.getStudentId(), practiceGroup.getStudentId().toString());
|
|
|
+ String baseUrl = sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
|
|
|
+ String memo = baseUrl + "/#/study?classGroupId=" + classGroup.getId();
|
|
|
+ BasicUserDto teacherInfo = teacherDao.findTeacherInfo(courseScheduleEvaluate.getTeacherId());
|
|
|
+
|
|
|
+ sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.PUSH_STUDY_REPORT, push, null, 0, memo, "STUDENT",
|
|
|
+ teacherInfo.getName(),HttpUtil.getSortUrl(memo));
|
|
|
return true;
|
|
|
}
|
|
|
|