|
|
@@ -14,6 +14,7 @@ package vip.xiaonuo.disk.controller;
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.core.collection.CollStreamUtil;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
@@ -32,6 +33,8 @@ import vip.xiaonuo.auth.core.util.StpLoginUserUtil;
|
|
|
import vip.xiaonuo.common.annotation.CommonLog;
|
|
|
import vip.xiaonuo.common.pojo.CommonResult;
|
|
|
import vip.xiaonuo.common.pojo.CommonValidList;
|
|
|
+import vip.xiaonuo.dev.modular.message.param.DevMessageSendParam;
|
|
|
+import vip.xiaonuo.dev.modular.message.service.DevMessageService;
|
|
|
import vip.xiaonuo.disk.domain.*;
|
|
|
import vip.xiaonuo.disk.param.courseInfo.CourseInfoAddParam;
|
|
|
import vip.xiaonuo.disk.param.courseInfo.CourseInfoEditParam;
|
|
|
@@ -71,6 +74,8 @@ public class CourseInfoController {
|
|
|
private CourseRelateService courseRelateService;
|
|
|
@Resource
|
|
|
private CourseStudentCollectService courseStudentCollectService;
|
|
|
+ @Resource
|
|
|
+ private DevMessageService devMessageService;
|
|
|
|
|
|
/**
|
|
|
* 课程信息-分页列表
|
|
|
@@ -453,4 +458,38 @@ public class CourseInfoController {
|
|
|
return CommonResult.ok();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 课程管理-一键催交
|
|
|
+ *
|
|
|
+ * @author honorfire
|
|
|
+ * @date 2025/06/20 14:58
|
|
|
+ */
|
|
|
+ @ApiOperationSupport(order = 3)
|
|
|
+ @ApiOperation("课程管理-一键催交")
|
|
|
+ @CommonLog("课程管理-一键催交")
|
|
|
+ @SaCheckPermission("/disk/courseinfo/urgeSubmit")
|
|
|
+ @GetMapping("/disk/courseinfo/urgeSubmit")
|
|
|
+ public CommonResult<String> courseinfo(HttpServletRequest req) {
|
|
|
+ Map param=new HashMap();
|
|
|
+ String hourId=req.getParameter("hourId");
|
|
|
+ ClassHour classHour=classHourService.queryEntity(hourId);
|
|
|
+ Chapter chapter = chapterService.queryEntity(classHour.getChapterId());
|
|
|
+ CourseInfo courseInfo = courseInfoService.queryEntity(chapter.getCourseId());
|
|
|
+ param.put("courseId", courseInfo.getCourseId());
|
|
|
+ param.put("teacherId", StpLoginUserUtil.getLoginUser().getId());
|
|
|
+ //查询当前老师自己所有课程下所有人员
|
|
|
+ List<Map<String,Object>> openCourseUserList=courseInfoService.getOpenCourseUserList(param);
|
|
|
+ List<String> userIdList= openCourseUserList.stream().map(map -> (String) map.get("studentId")).collect(Collectors.toList());
|
|
|
+ String subject="课程:"+courseInfo.getCourseName()+"-章节:"+chapter.getName()+"-课时:"+classHour.getName()+"下存在章节测验,请及时参与";
|
|
|
+ String content="课程:"+courseInfo.getCourseName()+"-章节:"+chapter.getName()+"-课时:"+classHour.getName()+"下存在章节测验,请及时参与";
|
|
|
+ DevMessageSendParam devMessageSendParam=new DevMessageSendParam();
|
|
|
+ devMessageSendParam.setSubject(subject);
|
|
|
+ devMessageSendParam.setContent(content);
|
|
|
+ devMessageSendParam.setReceiverIdList(userIdList);
|
|
|
+ if(userIdList.size()>0) devMessageService.send(devMessageSendParam);
|
|
|
+ return CommonResult.ok();
|
|
|
+ }
|
|
|
+
|
|
|
}
|