Przeglądaj źródła

新增视频删除状态重置接口

wangliang 2 lat temu
rodzic
commit
083d3815cd

+ 16 - 0
themis-admin/src/main/java/com/qmth/themis/admin/api/SysController.java

@@ -559,6 +559,22 @@ public class SysController {
         return ResultUtil.ok(teExamService.videoQuery(new Page<>(pageNumber, pageSize), orgCode, orgName, type));
         return ResultUtil.ok(teExamService.videoQuery(new Page<>(pageNumber, pageSize), orgCode, orgName, type));
     }
     }
 
 
+    @ApiOperation(value = "视频删除状态重置接口")
+    @RequestMapping(value = "/video/status/reset", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "超管视频存储查询接口", response = VideoQueryResult.class)})
+    public Result videoStatusReset(@ApiParam(value = "考试id", required = true) @RequestParam Long examId) {
+        TEExam teExam = teExamService.getById(examId);
+        if (Objects.nonNull(teExam) && Objects.nonNull(teExam.getVideoDelete()) && teExam.getVideoDelete()) {
+            TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
+            teExam.setVideoDelete(false);
+            teExam.setUpdateId(tbUser.getId());
+            teExam.setUpdateTime(System.currentTimeMillis());
+            teExamService.updateById(teExam);
+            teExamService.updateExamCacheBean(examId);
+        }
+        return ResultUtil.ok(true);
+    }
+
     @ApiOperation(value = "视频存储删除接口")
     @ApiOperation(value = "视频存储删除接口")
     @RequestMapping(value = "/video/delete", method = RequestMethod.POST)
     @RequestMapping(value = "/video/delete", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "超管视频存储删除接口", response = Result.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "超管视频存储删除接口", response = Result.class)})

+ 2 - 0
themis-business/src/main/resources/db/init-table-data.sql

@@ -236,6 +236,7 @@ INSERT INTO `t_b_privilege` VALUES (201, '试卷删除', '/api/admin/exam/paper/
 INSERT INTO `t_b_privilege` VALUES (202, '视频存储管理', 'VideoSaveManagement', 'MENU', 1, 6, NULL, 1600932652000);
 INSERT INTO `t_b_privilege` VALUES (202, '视频存储管理', 'VideoSaveManagement', 'MENU', 1, 6, NULL, 1600932652000);
 INSERT INTO `t_b_privilege` VALUES (203, '视频存储查询', '/api/admin/sys/video/select', 'LINK', 202, 1, NULL, 1600932652000);
 INSERT INTO `t_b_privilege` VALUES (203, '视频存储查询', '/api/admin/sys/video/select', 'LINK', 202, 1, NULL, 1600932652000);
 INSERT INTO `t_b_privilege` VALUES (204, '视频存储删除', '/api/admin/sys/video/delete', 'LINK', 202, 2, NULL, 1600932652000);
 INSERT INTO `t_b_privilege` VALUES (204, '视频存储删除', '/api/admin/sys/video/delete', 'LINK', 202, 2, NULL, 1600932652000);
+INSERT INTO `t_b_privilege` VALUES (205, '视频删除状态重置', '/api/admin/sys/video/status/reset', 'LINK', 202, 3, NULL, 1600932652000);
 
 
 INSERT INTO `t_b_role_privilege` VALUES (1, 'SUPER_ADMIN', 1);
 INSERT INTO `t_b_role_privilege` VALUES (1, 'SUPER_ADMIN', 1);
 INSERT INTO `t_b_role_privilege` VALUES (2, 'SUPER_ADMIN', 2);
 INSERT INTO `t_b_role_privilege` VALUES (2, 'SUPER_ADMIN', 2);
@@ -483,6 +484,7 @@ INSERT INTO `t_b_role_privilege` VALUES (251, 'ADMIN', 201);
 INSERT INTO `t_b_role_privilege` VALUES (252, 'SUPER_ADMIN', 203);
 INSERT INTO `t_b_role_privilege` VALUES (252, 'SUPER_ADMIN', 203);
 INSERT INTO `t_b_role_privilege` VALUES (253, 'SUPER_ADMIN', 204);
 INSERT INTO `t_b_role_privilege` VALUES (253, 'SUPER_ADMIN', 204);
 INSERT INTO `t_b_role_privilege` VALUES (254, 'SUPER_ADMIN', 202);
 INSERT INTO `t_b_role_privilege` VALUES (254, 'SUPER_ADMIN', 202);
+INSERT INTO `t_b_role_privilege` VALUES (255, 'SUPER_ADMIN', 203);
 
 
 INSERT INTO `t_b_role` VALUES (1, 'SUPER_ADMIN', '系统管理员', 1600932652000);
 INSERT INTO `t_b_role` VALUES (1, 'SUPER_ADMIN', '系统管理员', 1600932652000);
 INSERT INTO `t_b_role` VALUES (2, 'INVIGILATE', '监考员', 1600932652000);
 INSERT INTO `t_b_role` VALUES (2, 'INVIGILATE', '监考员', 1600932652000);

+ 1 - 1
themis-business/src/main/resources/mapper/TBExamInvigilateUserMapper.xml

@@ -49,7 +49,7 @@
         t.examName,
         t.examName,
         t.roomCode,
         t.roomCode,
         t.roomName
         t.roomName
-        order by t.examName,t.roomCode
+        order by t.examName,CAST(t.roomCode AS UNSIGNED)
     </select>
     </select>
 
 
     <select id="examInvigilateUserExport" resultType="com.qmth.themis.business.dto.RoomCodeExportDto">
     <select id="examInvigilateUserExport" resultType="com.qmth.themis.business.dto.RoomCodeExportDto">