Browse Source

Merge remote-tracking branch 'origin/ywx' into wn

ywx
王宁 3 months ago
parent
commit
79131309e9

+ 8
- 1
smarking/src/main/java/com/xhkjedu/smarking/controller/exam/MsClassStudentController.java View File

@@ -162,11 +162,18 @@ public class MsClassStudentController {
162 162
      **/
163 163
     @PostMapping("/search_student")
164 164
     public ResultVo searchStudent(@RequestBody CStudentVo cs) {
165
+        Integer page = cs.getPage();
166
+        Integer size = cs.getPageSize();
165 167
         N_Utils.validation(new Object[]{
166 168
                 cs.getExamid(), "考试id", 1
167 169
                 , cs.getSchoolid(), "学校id", 1
168 170
                 , cs.getClasstype(), "班级类型", 1
171
+                , page, "页码", 1
172
+                , size, "条数", 1
169 173
         });
170
-        return new ResultVo(0, "查询成功!", msClassStudentService.searchStudent(cs));
174
+        PageHelper.startPage(page, size);
175
+        List<Map> list = msClassStudentService.searchStudent(cs);
176
+        PageResult pageResult = PageUtil.getPageResult(new PageInfo<>(list));
177
+        return new ResultVo(0, "查询成功!", pageResult);
171 178
     }
172 179
 }

+ 2
- 1
smarking/src/main/java/com/xhkjedu/smarking/vo/exam/CStudentVo.java View File

@@ -1,5 +1,6 @@
1 1
 package com.xhkjedu.smarking.vo.exam;
2 2
 
3
+import com.xhkjedu.model.BaseBean;
3 4
 import lombok.Data;
4 5
 
5 6
 /**
@@ -8,7 +9,7 @@ import lombok.Data;
8 9
  * @Date 2024/10/21 17:36
9 10
  **/
10 11
 @Data
11
-public class CStudentVo {
12
+public class CStudentVo extends BaseBean {
12 13
     //阅卷考试学生ID
13 14
     private Integer mcsid;
14 15
     //考试id

+ 2
- 2
smarking/src/main/resources/mapper/exam/MsClassStudentMapper.xml View File

@@ -112,13 +112,13 @@
112 112
     <delete id="deleteByStu">
113 113
         delete ps.*,cs.*
114 114
         from ms_class_student cs left join ms_paper_student ps on cs.examid=ps.examid and cs.subjectid=ps.subjectid and cs.studentid=ps.studentid
115
-        where cs.examid=#{cs.examid} and cs.studentid=#{cs.studentid}
115
+        where cs.examid=#{cs.examid} and cs.studentid=#{cs.studentid} and cs.subjectid=#{cs.subjectid}
116 116
     </delete>
117 117
     <!--移除班级学生-->
118 118
     <delete id="deleteByClass">
119 119
         delete ps.*,cs.*,c.*
120 120
         from ms_class c left join ms_class_student cs on c.examid=cs.examid and c.classid=cs.classid
121 121
                         left join ms_paper_student ps on cs.examid=ps.examid and cs.studentid=ps.studentid
122
-        where c.examid=#{c.examid} and c.classid=#{c.classid}
122
+        where c.examid=#{cs.examid} and c.classid=#{cs.classid}
123 123
     </delete>
124 124
 </mapper>

Loading…
Cancel
Save