Ver Fonte

我的作业代码提交

pans há 6 meses atrás
pai
commit
64b68ef0fc

+ 1 - 1
snowy-plugin/snowy-plugin-disk/snowy-plugin-disk-func/src/main/java/vip/xiaonuo/disk/controller/CourseClassHourController.java

@@ -291,7 +291,7 @@ public class CourseClassHourController {
         //根据章节,获得的知识点
         List<String> knowledegeList=courseChapterKnowledgeService.selectknowledge(courseInfo.getCourseId(),chapterId,classHourIdParam.getId());
         //章节对应知识点
-        result.put("knowledeges", knowledegeList);
+        result.put("knowledgeIds", knowledegeList);
         return CommonResult.data(result);
     }
 

+ 1 - 1
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/domain/exam/TExamPageParam.java

@@ -80,7 +80,7 @@ public class TExamPageParam {
     /** 学生ID **/
     private String userId;
 
-    /** 考试类型 1 考试 2 章节测验 3 调查问卷  */
+    /** 考试类型 1 考试 2 章节测验 3 调查问卷  4 作业*/
     @ApiModelProperty(value = "考试类型", position = 12)
     private String examType;
 

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

@@ -29,7 +29,7 @@ import java.util.List;
  * @date  2025/07/22 10:51
  **/
 public interface TExamMapper extends BaseMapper<TExam> {
-    Page<TExamVo> queryList(@Param("page") Page<Object> objectPage, @Param("tExamPageParam") TExamPageParam tExamPageParam);
+    Page<TExamVo> queryList(@Param("page") Page<Object> objectPage, @Param("tExamPageParam") TExamPageParam tExamPageParam,@Param("examTypesList") List<String> examTypesList);
 
     TExamVo detail(String id);
 

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

@@ -34,8 +34,11 @@
         <if test="tExamPageParam.semesterId != null and tExamPageParam.semesterId != ''">
             and a.SEMESTER_ID = #{tExamPageParam.semesterId}
         </if>
-        <if test="tExamPageParam.examType != null and tExamPageParam.examType != ''">
-            and a.EXAM_TYPE = #{tExamPageParam.examType}
+        <if test="examTypesList != null">
+            and a.EXAM_TYPE in
+           <foreach collection="examTypesList" item="item" open="(" close=")" separator=",">
+               #{item}
+           </foreach>
         </if>
         <if test="tExamPageParam.createUser != null and tExamPageParam.createUser != ''">
             and a.CREATE_USER = #{tExamPageParam.createUser}

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

@@ -90,7 +90,9 @@ public class TExamServiceImpl extends ServiceImpl<TExamMapper, TExam> implements
         if(!StpLoginUserUtil.getLoginUser().getAccount().equals("superAdmin")){
             tExamPageParam.setCreateUser(StpLoginUserUtil.getLoginUser().getId());
         }
-        Page<TExamVo> page = tExamMapper.queryList(CommonPageRequest.defaultPage(), tExamPageParam);
+        String[] examTypesArray = tExamPageParam.getExamType().split(",");
+        List<String> examTypesList = Arrays.asList(examTypesArray);
+        Page<TExamVo> page = tExamMapper.queryList(CommonPageRequest.defaultPage(), tExamPageParam,examTypesList);
         return page;
     }