Bladeren bron

设置出卷人

tags/正式版本
雍文秀 2 jaren geleden
bovenliggende
commit
12d7779123

+ 17
- 0
sexam/src/main/java/com/xhkjedu/sexam/controller/exam/EBaseController.java Bestand weergeven

@@ -337,4 +337,21 @@ public class EBaseController {
337 337
         Map map = eBaseService.listSubject(examid);
338 338
         return new ResultVo(0, "获取考试科目列表成功", map);
339 339
     }
340
+
341
+    /**
342
+     * 设置出卷人
343
+     *
344
+     * @return com.xhkjedu.vo.ResultVo
345
+     * @Param [subject]
346
+     * @Author ywx
347
+     * @Date 2022/7/27 17:28
348
+     **/
349
+    @PostMapping("/set_st")
350
+    public ResultVo setSubjectTeacher(@RequestBody ESubject subject) {
351
+        Integer esid = subject.getEsid();
352
+        Integer teacherid = subject.getTeacherid();
353
+        N_Utils.validation(new Object[]{esid, "考试科目id", 1, teacherid, "出卷人", 1});
354
+        eBaseService.setSubjectTeacher(subject);
355
+        return new ResultVo(0, "设置成功");
356
+    }
340 357
 }

+ 5
- 0
sexam/src/main/java/com/xhkjedu/sexam/service/exam/EBaseService.java Bestand weergeven

@@ -253,4 +253,9 @@ public class EBaseService {
253 253
     public List<Map> listTeacherByClassIds(String classids) {
254 254
         return userMapper.listTeacherByClassIds(classids);
255 255
     }
256
+
257
+    //设置出卷人
258
+    public void setSubjectTeacher(ESubject subject) {
259
+        eSubjectMapper.updateByPrimaryKeySelective(subject);
260
+    }
256 261
 }

Laden…
Annuleren
Opslaan