Ver código fonte

我的作业代码提交

pans 6 meses atrás
pai
commit
48dba89f3a

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

@@ -177,7 +177,7 @@ public class CourseChapterController {
                     classHourList.remove(i);          // 从原列表删除(安全操作)
                 }
             }
-
+            chapter.put("classHours", chapterClassHours);
         }
 //        //按chapterId分组课程
 //        Map<String, List<Map<String, Object>>> classHourByChapter = classHourList.stream()

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

@@ -15,7 +15,7 @@ import java.util.Map;
 @Mapper
 public interface ExamPaperAnswerMapper extends BaseMapper<ExamPaperAnswer> {
 
-    Page<ExamPaperAnswerVo> studentPage(@Param("studentIds") List<String> studentIds , @Param("page") Page<ExamPaperAnswerVo> page);
+    Page<ExamPaperAnswerVo> studentPage(@Param("studentIds") List<String> studentIds , @Param("page") Page<ExamPaperAnswerVo> page,@Param("paperName") String paperName,@Param("pageType") Integer pageType);
 
     Integer selectAllCount();
 

+ 6 - 0
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/mapper/mapping/ExamPaperAnswerMapper.xml

@@ -245,6 +245,12 @@
         <foreach item="item" collection="studentIds" open="(" separator="," close=")">
             #{item}
         </foreach>
+        <if test="paperName!=null">
+         and a.paper_name like concat('%',#{paperName},'%')
+        </if>
+        <if test="pageType!=null">
+          and a.paper_type =#{pageType}
+        </if>
         and a.paper_type!=5
     </where>
     ORDER BY a.create_time DESC

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

@@ -64,7 +64,7 @@ public class ExamPaperAnswerServiceImpl extends BaseServiceImpl<ExamPaperAnswer>
     public Page<ExamPaperAnswerVo> studentPage(ExamPaperAnswerPageVM requestVM, List<String> studentIds) {
         Page<ExamPaperAnswerVo> page = new Page<ExamPaperAnswerVo>(requestVM.getCurrent(), requestVM.getSize());
         page.setSearchCount(true); // 设置计算总记录数
-        return examPaperAnswerMapper.studentPage(studentIds,page);
+        return examPaperAnswerMapper.studentPage(studentIds,page,requestVM.getPaperName(),requestVM.getPageType());
     }
 
 

+ 22 - 0
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/viewmodel/student/exampaper/ExamPaperAnswerPageVM.java

@@ -12,6 +12,28 @@ public class ExamPaperAnswerPageVM extends BasePage {
 
     private Integer size;
 
+
+    private String paperName;
+
+    private Integer pageType;
+
+
+    public String getPaperName() {
+        return paperName;
+    }
+
+    public void setPaperName(String paperName) {
+        this.paperName = paperName;
+    }
+
+    public Integer getPageType() {
+        return pageType;
+    }
+
+    public void setPageType(Integer pageType) {
+        this.pageType = pageType;
+    }
+
     public Integer getSubjectId() {
         return subjectId;
     }