pans 6 месяцев назад
Родитель
Сommit
7dfd642bbc

+ 2 - 0
snowy-plugin/snowy-plugin-disk/snowy-plugin-disk-func/src/main/java/vip/xiaonuo/disk/mapper/CourseOpenMapper.java

@@ -50,4 +50,6 @@ public interface CourseOpenMapper extends BaseMapper<CourseOpen> {
     List<String> selectUserId(@Param("semesterId") String semesterId, @Param("courseId") String courseId);
     List<String> selectUserId(@Param("semesterId") String semesterId, @Param("courseId") String courseId);
 
 
     List<String> selectByGradesIds(List<Integer> gradesIdsList);
     List<String> selectByGradesIds(List<Integer> gradesIdsList);
+
+    List<String> selectUserIds(List<String> studentAccounts);
 }
 }

+ 10 - 0
snowy-plugin/snowy-plugin-disk/snowy-plugin-disk-func/src/main/java/vip/xiaonuo/disk/mapper/mapping/CourseOpenMapper.xml

@@ -184,6 +184,16 @@
         <foreach collection="gradesIdsList" separator="," close=")" open="(" item="gradesId">
         <foreach collection="gradesIdsList" separator="," close=")" open="(" item="gradesId">
             #{gradesId}
             #{gradesId}
         </foreach>
         </foreach>
+    </select>
 
 
+    <select id="selectUserIds" resultType="string">
+        SELECT
+         su.id
+        FROM SYS_USER su
+        WHERE ACCOUNT IN
+        <foreach collection="studentAccounts" separator="," close=")" open="(" item="item">
+            #{item}
+        </foreach>
     </select>
     </select>
+
 </mapper>
 </mapper>

+ 1 - 1
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/controller/student/ExamPaperAnswerController.java

@@ -83,7 +83,7 @@ public class ExamPaperAnswerController extends BaseApiController {
         userEventLog.setContent(content);
         userEventLog.setContent(content);
         eventPublisher.publishEvent(new CalculateExamPaperAnswerCompleteEvent(examPaperAnswerInfo));
         eventPublisher.publishEvent(new CalculateExamPaperAnswerCompleteEvent(examPaperAnswerInfo));
         eventPublisher.publishEvent(new UserEvent(userEventLog));
         eventPublisher.publishEvent(new UserEvent(userEventLog));
-        return CommonResult.data(scoreVm);
+        return CommonResult.data(String.valueOf(ExamUtil.scoreFromVM(scoreVm)));
     }
     }
     @ApiOperationSupport(order = 2)
     @ApiOperationSupport(order = 2)
     @ApiOperation("每次提交的分数")
     @ApiOperation("每次提交的分数")

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

@@ -175,7 +175,7 @@ public class TExamServiceImpl extends ServiceImpl<TExamMapper, TExam> implements
         this.addJob(tExam, "start");
         this.addJob(tExam, "start");
         this.addJob(tExam, "end");
         this.addJob(tExam, "end");
 
 
-        List<String> userIds=courseOpenMapper.selectUserId(tExamAddParam.getSemesterId(),tExamAddParam.getCourseId());
+        List<String>  userIds=courseOpenMapper.selectUserIds(studentAccounts);
         //给课程下关联的学生发送站内信消息
         //给课程下关联的学生发送站内信消息
         if(CollectionUtil.isNotEmpty(userIds)&&tExamAddParam.getExamStatus()==1){
         if(CollectionUtil.isNotEmpty(userIds)&&tExamAddParam.getExamStatus()==1){
             DevMessageSendParam devMessageSendParam=new DevMessageSendParam();
             DevMessageSendParam devMessageSendParam=new DevMessageSendParam();
@@ -273,8 +273,8 @@ public class TExamServiceImpl extends ServiceImpl<TExamMapper, TExam> implements
         BeanUtil.copyProperties(tExamEditParam, tExam);
         BeanUtil.copyProperties(tExamEditParam, tExam);
         this.updateById(tExam);
         this.updateById(tExam);
 
 
+        List<String>  userIds=courseOpenMapper.selectUserIds(studentAccounts);
 
 
-        List<String> userIds=courseOpenMapper.selectUserId(tExamEditParam.getSemesterId(),tExamEditParam.getCourseId());
 
 
         //给课程下关联的学生发送站内信消息
         //给课程下关联的学生发送站内信消息
         if(CollectionUtil.isNotEmpty(userIds)&&tExamEditParam.getExamStatus()==1){
         if(CollectionUtil.isNotEmpty(userIds)&&tExamEditParam.getExamStatus()==1){