瀏覽代碼

字段修改

wangliang 4 年之前
父節點
當前提交
9ce12fc391

+ 2 - 2
themis-backend/src/main/java/com/qmth/themis/backend/api/TIeInvigilateController.java

@@ -84,8 +84,8 @@ public class TIeInvigilateController {
     @RequestMapping(value = "/notice", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
     public Result notice(@ApiJsonObject(name = "invigilateNotice", value = {
-            @ApiJsonProperty(key = "examRecordId", description = "考试记录id"),
-            @ApiJsonProperty(key = "type", description = "收卷类型,手动/强制")
+            @ApiJsonProperty(key = "recordId", description = "考试记录id"),
+            @ApiJsonProperty(key = "type", description = "消息类型,text/audio")
     }) @ApiParam(value = "考试记录信息", required = true) @RequestBody Map<String, Object> mapParameter) {
         return ResultUtil.ok(SystemConstant.SUCCESS);
     }

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/dto/request/TEExamDto.java

@@ -209,10 +209,10 @@ public class TEExamDto extends BaseEntity {
         this.inProcessFaceStrangerIgnore = teExam.getInProcessFaceStrangerIgnore();
         this.inProcessLivenessVerify = teExam.getInProcessLivenessVerify();
         if (Objects.nonNull(teExam.getInProcessLivenessFixedRange())) {
-            String[] longs = teExam.getInProcessLivenessFixedRange().trim().split(",");
+            String[] longs = teExam.getInProcessLivenessFixedRange().trim().replaceAll(" ", "").split(",");
             List inProcessLivenessFixedRange = new ArrayList();
             for (int i = 0; i < longs.length; i++) {
-                Long l = Long.valueOf(longs[i].trim());
+                Long l = Long.valueOf(longs[i].trim().replaceAll(" ", ""));
                 inProcessLivenessFixedRange.add(l);
             }
             setInProcessLivenessFixedRange(inProcessLivenessFixedRange);
@@ -224,7 +224,7 @@ public class TEExamDto extends BaseEntity {
         this.scoreStatus = teExam.getScoreStatus();
         this.objectiveScorePolicy = teExam.getObjectiveScorePolicy();
         if (Objects.nonNull(teExam.getMonitorVideoSource())) {
-            setMonitorVideoSource(Arrays.asList(teExam.getMonitorVideoSource().trim().split(",")));
+            setMonitorVideoSource(Arrays.asList(teExam.getMonitorVideoSource().trim().replaceAll(" ", "").split(",")));
         }
         this.monitorRecord = teExam.getMonitorRecord();
         this.progress = teExam.getProgress();

+ 2 - 2
themis-business/src/main/java/com/qmth/themis/business/entity/TEExam.java

@@ -213,7 +213,7 @@ public class TEExam extends BaseEntity {
         this.inProcessFaceStrangerIgnore = teExamDto.getInProcessFaceStrangerIgnore();
         this.inProcessLivenessVerify = teExamDto.getInProcessLivenessVerify();
         if (Objects.nonNull(teExamDto.getInProcessLivenessFixedRange())) {
-            this.inProcessLivenessFixedRange = teExamDto.getInProcessLivenessFixedRange().toString().trim().replace("[", "").replace("]", "");
+            this.inProcessLivenessFixedRange = teExamDto.getInProcessLivenessFixedRange().toString().trim().replace("[", "").replace("]", "").replaceAll(" ","");
         }
         this.inProcessLivenessJudgePolicy = teExamDto.getInProcessLivenessJudgePolicy();
         this.recordSelectStrategy = teExamDto.getRecordSelectStrategy();
@@ -222,7 +222,7 @@ public class TEExam extends BaseEntity {
         this.scoreStatus = teExamDto.getScoreStatus();
         this.objectiveScorePolicy = teExamDto.getObjectiveScorePolicy();
         if (Objects.nonNull(teExamDto.getMonitorVideoSource())) {
-            this.monitorVideoSource = teExamDto.getMonitorVideoSource().toString().trim().replace("[", "").replace("]", "");
+            this.monitorVideoSource = teExamDto.getMonitorVideoSource().toString().trim().replace("[", "").replace("]", "").replaceAll(" ","");
         }
         this.monitorRecord = teExamDto.getMonitorRecord();
         this.progress = teExamDto.getProgress();

+ 4 - 3
themis-business/src/main/java/com/qmth/themis/business/entity/TIeExamInvigilateNotice.java

@@ -3,6 +3,7 @@ package com.qmth.themis.business.entity;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.qmth.themis.business.enums.InvigilateNoticeEnum;
+import com.qmth.themis.business.enums.MessageTypeEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -43,7 +44,7 @@ public class TIeExamInvigilateNotice implements Serializable {
 
     @ApiModelProperty(value = "消息类型")
     @TableField(value = "type")
-    private InvigilateNoticeEnum type;
+    private MessageTypeEnum type;
 
     @ApiModelProperty(value = "消息内容")
     @TableField(value = "content")
@@ -101,11 +102,11 @@ public class TIeExamInvigilateNotice implements Serializable {
         this.userId = userId;
     }
 
-    public InvigilateNoticeEnum getType() {
+    public MessageTypeEnum getType() {
         return type;
     }
 
-    public void setType(InvigilateNoticeEnum type) {
+    public void setType(MessageTypeEnum type) {
         this.type = type;
     }
 

+ 25 - 0
themis-business/src/main/java/com/qmth/themis/business/enums/MessageTypeEnum.java

@@ -0,0 +1,25 @@
+package com.qmth.themis.business.enums;
+
+/**
+ * @Description: 消息类型
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2020/8/8
+ */
+public enum MessageTypeEnum {
+
+    TEXT("文本消息"),
+
+    AUDIO("语音消息");
+
+    private String code;
+
+    private MessageTypeEnum(String code) {
+        this.code = code;
+    }
+
+    public String getCode() {
+        return code;
+    }
+}