Browse Source

考试相关代码提交

pans 6 months ago
parent
commit
e6c9bfff88

+ 4 - 0
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/domain/TExam.java

@@ -100,6 +100,10 @@ public class TExam {
     private String courseId;
     @ApiModelProperty(value = "课时ID", position = 14)
     private String hourId;
+    /** 班级集合  */
+    private String gradesids;
+
+
 
 
 }

+ 2 - 1
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/mapper/mapping/TExamMapper.xml

@@ -112,7 +112,8 @@
             a.EXAM_TYPE examType,
             a.SEMESTER_ID semesterId,
             c.name semesterName,
-            a.course_id courseId
+            a.course_id courseId,
+            a.gradesids gradesids
         FROM
             ONLINEEDU.T_EXAM a
         LEFT JOIN  SEMESTER c ON a.SEMESTER_ID =c.ID

+ 9 - 1
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/service/impl/TExamServiceImpl.java

@@ -154,6 +154,10 @@ public class TExamServiceImpl extends ServiceImpl<TExamMapper, TExam> implements
             }else{
                 return CommonResult.error("根据班级没有查出对应的学生!!!");
             }
+            String gradesIdsStr = tExamAddParam.getGradesIdsList().stream()
+                    .map(Object::toString)
+                    .collect(Collectors.joining(","));
+            tExam.setGradesids(gradesIdsStr);
         }
 
 
@@ -172,7 +176,7 @@ public class TExamServiceImpl extends ServiceImpl<TExamMapper, TExam> implements
         //给课程下关联的学生发送站内信消息
         if(CollectionUtil.isNotEmpty(userIds)&&tExamAddParam.getExamStatus()==1){
             DevMessageSendParam devMessageSendParam=new DevMessageSendParam();
-            devMessageSendParam.setReceiverIdList(studentAccounts);
+            devMessageSendParam.setReceiverIdList(userIds);
             devMessageSendParam.setSubject(tExamAddParam.getExamName());
             devMessageSendParam.setCategory(DevMessageCategoryEnum.BIZ.getValue());
             devMessageSendParam.setContent(tExamAddParam.getExamName()+"已开始!!!");
@@ -233,6 +237,10 @@ public class TExamServiceImpl extends ServiceImpl<TExamMapper, TExam> implements
             }else{
                 return CommonResult.error("根据班级没有查出对应的学生!!!");
             }
+            String gradesIdsStr = tExamEditParam.getGradesIdsList().stream()
+                    .map(Object::toString)
+                    .collect(Collectors.joining(","));
+            tExam.setGradesids(gradesIdsStr);
         }
 
 

+ 4 - 0
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/vo/TExamVo.java

@@ -98,6 +98,10 @@ public class TExamVo {
      */
     private Integer answerId;
 
+    /**
+     * 班级集合ids
+     */
+    private String gradesids;
 
 
 }