Browse Source

传参方式修改

xiatian 4 years ago
parent
commit
1afde265ce

+ 88 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/exam/AnswerSubmitParamBean.java

@@ -0,0 +1,88 @@
+package com.qmth.themis.business.bean.exam;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel("提交作答结果参数")
+public class AnswerSubmitParamBean {
+	
+	@ApiModelProperty("考试记录id")
+	private Long recordId;
+	
+	@ApiModelProperty("大题号")
+	private Integer mainNumber;
+
+	@ApiModelProperty("小题号")
+	private Integer subNumber;
+	
+	@ApiModelProperty("套题子题序号")
+	private Integer subIndex;
+	
+	@ApiModelProperty("答案json字符串")
+	private String answer;
+	
+	@ApiModelProperty("时间戳")
+	private Long version;
+	
+	@ApiModelProperty("作答累计秒数")
+	private Integer durationSeconds;
+
+	public Long getRecordId() {
+		return recordId;
+	}
+
+	public void setRecordId(Long recordId) {
+		this.recordId = recordId;
+	}
+
+	public Integer getMainNumber() {
+		return mainNumber;
+	}
+
+	public void setMainNumber(Integer mainNumber) {
+		this.mainNumber = mainNumber;
+	}
+
+	public Integer getSubNumber() {
+		return subNumber;
+	}
+
+	public void setSubNumber(Integer subNumber) {
+		this.subNumber = subNumber;
+	}
+
+	public Integer getSubIndex() {
+		return subIndex;
+	}
+
+	public void setSubIndex(Integer subIndex) {
+		this.subIndex = subIndex;
+	}
+
+	public String getAnswer() {
+		return answer;
+	}
+
+	public void setAnswer(String answer) {
+		this.answer = answer;
+	}
+
+	public Long getVersion() {
+		return version;
+	}
+
+	public void setVersion(Long version) {
+		this.version = version;
+	}
+
+	public Integer getDurationSeconds() {
+		return durationSeconds;
+	}
+
+	public void setDurationSeconds(Integer durationSeconds) {
+		this.durationSeconds = durationSeconds;
+	}
+	
+
+	
+}

+ 43 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/exam/AudioLeftPlayCountSubmitParamBean.java

@@ -0,0 +1,43 @@
+package com.qmth.themis.business.bean.exam;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel("更新音频剩余播放次数参数")
+public class AudioLeftPlayCountSubmitParamBean {
+	
+	@ApiModelProperty("考试记录id")
+	private Long recordId;
+	
+	@ApiModelProperty("音频标识")
+	private String key;
+
+	@ApiModelProperty("剩余播放次数")
+	private Integer count;
+
+	public Long getRecordId() {
+		return recordId;
+	}
+
+	public void setRecordId(Long recordId) {
+		this.recordId = recordId;
+	}
+
+	public String getKey() {
+		return key;
+	}
+
+	public void setKey(String key) {
+		this.key = key;
+	}
+
+	public Integer getCount() {
+		return count;
+	}
+
+	public void setCount(Integer count) {
+		this.count = count;
+	}
+
+	
+}

+ 32 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/exam/ExamStartParamBean.java

@@ -0,0 +1,32 @@
+package com.qmth.themis.business.bean.exam;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel("开始考试参数")
+public class ExamStartParamBean {
+	
+	@ApiModelProperty("考试记录id")
+	private Long recordId;
+	
+	@ApiModelProperty("断点续考原因")
+	private String reason;
+
+	public Long getRecordId() {
+		return recordId;
+	}
+
+	public void setRecordId(Long recordId) {
+		this.recordId = recordId;
+	}
+
+	public String getReason() {
+		return reason;
+	}
+
+	public void setReason(String reason) {
+		this.reason = reason;
+	}
+
+	
+}

+ 100 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/exam/FaceVerifyParamBean.java

@@ -0,0 +1,100 @@
+package com.qmth.themis.business.bean.exam;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel("人脸验证结果参数")
+public class FaceVerifyParamBean {
+
+	@ApiModelProperty("考试记录ID")
+	private Long recordId;
+	
+	@ApiModelProperty("FIRST_START:首次开考, RESUME_START:断点恢复, IN_PROCESS:过程中")
+	private String type;
+	
+	@ApiModelProperty("照片文件URL")
+	private String photoUrl;
+	
+	@ApiModelProperty("人脸数量")
+	private Integer faceCount;
+	
+	@ApiModelProperty("相似度分数")
+	private Double similarity;
+	
+	@ApiModelProperty("真实性结果")
+	private Double realness;
+	
+	@ApiModelProperty("验证时间")
+	private Long time;
+	
+	@ApiModelProperty("NONE: 无异常 FACE_COUNT_ERROR: 人脸数量异常 FACE_COMPARE_ERROR: 人脸比对异常 EYE_CLOSE_ERROR: 闭眼检测异常")
+	private String exception;
+
+	public Long getRecordId() {
+		return recordId;
+	}
+
+	public void setRecordId(Long recordId) {
+		this.recordId = recordId;
+	}
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public String getPhotoUrl() {
+		return photoUrl;
+	}
+
+	public void setPhotoUrl(String photoUrl) {
+		this.photoUrl = photoUrl;
+	}
+
+	public Integer getFaceCount() {
+		return faceCount;
+	}
+
+	public void setFaceCount(Integer faceCount) {
+		this.faceCount = faceCount;
+	}
+
+	public Double getSimilarity() {
+		return similarity;
+	}
+
+	public void setSimilarity(Double similarity) {
+		this.similarity = similarity;
+	}
+
+	public Double getRealness() {
+		return realness;
+	}
+
+	public void setRealness(Double realness) {
+		this.realness = realness;
+	}
+
+	public Long getTime() {
+		return time;
+	}
+
+	public void setTime(Long time) {
+		this.time = time;
+	}
+
+	public String getException() {
+		return exception;
+	}
+
+	public void setException(String exception) {
+		this.exception = exception;
+	}
+	
+	
+
+
+}

+ 42 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/exam/FinishParamBean.java

@@ -0,0 +1,42 @@
+package com.qmth.themis.business.bean.exam;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel("结束考试参数")
+public class FinishParamBean {
+
+	@ApiModelProperty("考试记录id")
+	private Long recordId;
+	
+	@ApiModelProperty("结束类型")
+	private String type;
+	
+	@ApiModelProperty("总用时秒数")
+	private Integer durationSeconds;
+
+	public Long getRecordId() {
+		return recordId;
+	}
+
+	public void setRecordId(Long recordId) {
+		this.recordId = recordId;
+	}
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public Integer getDurationSeconds() {
+		return durationSeconds;
+	}
+
+	public void setDurationSeconds(Integer durationSeconds) {
+		this.durationSeconds = durationSeconds;
+	}
+
+}

+ 86 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/exam/LivenessVerifyParamBean.java

@@ -0,0 +1,86 @@
+package com.qmth.themis.business.bean.exam;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel("活体验证结果参数")
+public class LivenessVerifyParamBean {
+
+	@ApiModelProperty("考试记录ID")
+	private Long recordId;
+
+	@ApiModelProperty("FIRST_START: 首次开考 RESUME_START: 断点恢复 IN_PROCESS: 过程中 WARNING_AUTO: 预警自动加入 INVIGILATE_MANUAL: 监考手工加入")
+	private String type;
+
+	@ApiModelProperty("动作详情")
+	private String actions;
+
+	@ApiModelProperty("整体第几次重试")
+	private Integer retry;
+
+	@ApiModelProperty("验证开始时间")
+	private Long startTime;
+
+	@ApiModelProperty("验证结束时间")
+	private Long finishTime;
+
+	@ApiModelProperty("验证异常")
+	private String exception;
+
+	public Long getRecordId() {
+		return recordId;
+	}
+
+	public void setRecordId(Long recordId) {
+		this.recordId = recordId;
+	}
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public String getActions() {
+		return actions;
+	}
+
+	public void setActions(String actions) {
+		this.actions = actions;
+	}
+
+	public Integer getRetry() {
+		return retry;
+	}
+
+	public void setRetry(Integer retry) {
+		this.retry = retry;
+	}
+
+	public Long getStartTime() {
+		return startTime;
+	}
+
+	public void setStartTime(Long startTime) {
+		this.startTime = startTime;
+	}
+
+	public Long getFinishTime() {
+		return finishTime;
+	}
+
+	public void setFinishTime(Long finishTime) {
+		this.finishTime = finishTime;
+	}
+
+	public String getException() {
+		return exception;
+	}
+
+	public void setException(String exception) {
+		this.exception = exception;
+	}
+
+}

+ 21 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/exam/PrepareParamBean.java

@@ -0,0 +1,21 @@
+package com.qmth.themis.business.bean.exam;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel("考试候考参数")
+public class PrepareParamBean {
+	
+	@ApiModelProperty("考生id")
+	private Long examStudentId;
+
+	public Long getExamStudentId() {
+		return examStudentId;
+	}
+
+	public void setExamStudentId(Long examStudentId) {
+		this.examStudentId = examStudentId;
+	}
+	
+	
+}

+ 20 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/exam/ResultParamBean.java

@@ -0,0 +1,20 @@
+package com.qmth.themis.business.bean.exam;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel("查询交卷结果参数")
+public class ResultParamBean {
+
+	@ApiModelProperty("考试记录id")
+	private Long recordId;
+
+	public Long getRecordId() {
+		return recordId;
+	}
+
+	public void setRecordId(Long recordId) {
+		this.recordId = recordId;
+	}
+
+}

+ 20 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/exam/ResumeParamBean.java

@@ -0,0 +1,20 @@
+package com.qmth.themis.business.bean.exam;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel("断点恢复参数")
+public class ResumeParamBean {
+
+	@ApiModelProperty("考试记录id")
+	private Long recordId;
+
+	public Long getRecordId() {
+		return recordId;
+	}
+
+	public void setRecordId(Long recordId) {
+		this.recordId = recordId;
+	}
+
+}

+ 33 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/exam/StudentPaperStructParamBean.java

@@ -0,0 +1,33 @@
+package com.qmth.themis.business.bean.exam;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel("上传个人试卷结构参数")
+public class StudentPaperStructParamBean {
+	
+	@ApiModelProperty("考试记录id")
+	private Long recordId;
+	
+	@ApiModelProperty("试卷结构json字符串")
+	private String content;
+
+	public Long getRecordId() {
+		return recordId;
+	}
+
+	public void setRecordId(Long recordId) {
+		this.recordId = recordId;
+	}
+
+	public String getContent() {
+		return content;
+	}
+
+	public void setContent(String content) {
+		this.content = content;
+	}
+
+
+	
+}

+ 277 - 222
themis-exam/src/main/java/com/qmth/themis/exam/api/TEExamController.java

@@ -7,7 +7,7 @@ import java.util.Objects;
 
 import javax.annotation.Resource;
 
-import com.qmth.themis.business.dto.cache.TEStudentCacheDto;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -15,12 +15,20 @@ import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.qmth.themis.business.bean.exam.AnswerSubmitParamBean;
+import com.qmth.themis.business.bean.exam.AudioLeftPlayCountSubmitParamBean;
+import com.qmth.themis.business.bean.exam.ExamStartParamBean;
+import com.qmth.themis.business.bean.exam.FinishParamBean;
+import com.qmth.themis.business.bean.exam.PrepareParamBean;
+import com.qmth.themis.business.bean.exam.ResultParamBean;
+import com.qmth.themis.business.bean.exam.ResumeParamBean;
+import com.qmth.themis.business.bean.exam.StudentPaperStructParamBean;
 import com.qmth.themis.business.cache.ExamRecordCacheUtil;
 import com.qmth.themis.business.constant.SystemConstant;
+import com.qmth.themis.business.dto.cache.TEStudentCacheDto;
 import com.qmth.themis.business.dto.response.TEExamDto;
 import com.qmth.themis.business.dto.response.TEExamResultDto;
 import com.qmth.themis.business.entity.TEExam;
-import com.qmth.themis.business.entity.TEStudent;
 import com.qmth.themis.business.enums.ExamRecordStatusEnum;
 import com.qmth.themis.business.enums.MqEnum;
 import com.qmth.themis.business.service.TEExamService;
@@ -46,236 +54,283 @@ import io.swagger.annotations.ApiResponses;
 @RequestMapping("/${prefix.url.exam}/exam")
 public class TEExamController {
 
-    @Resource
-    TEExamService teExamService;
-    @Resource
-    RedisUtil redisUtil;
-    @Resource
-    MqDtoService mqDtoService;
+	@Resource
+	TEExamService teExamService;
+	@Resource
+	RedisUtil redisUtil;
+	@Resource
+	MqDtoService mqDtoService;
+
+	@ApiOperation(value = "验证考试口令接口")
+	@RequestMapping(value = "/shortCode", method = RequestMethod.POST)
+	@ApiResponses({ @ApiResponse(code = 200, message = "考试信息", response = TEExam.class) })
+	public Result shortCode(@ApiParam(value = "考试口令", required = true) @RequestParam String shortCode) {
+		if (Objects.isNull(shortCode) || Objects.equals(shortCode, "")) {
+			throw new BusinessException(ExceptionResultEnum.SHORT_CODE_IS_NULL);
+		}
+		QueryWrapper<TEExam> teExamQueryWrapper = new QueryWrapper<>();
+		teExamQueryWrapper.lambda().eq(TEExam::getShortCode, shortCode);
+		TEExam teExam = teExamService.getOne(teExamQueryWrapper);
+		if (Objects.isNull(teExam)) {
+			throw new BusinessException(ExceptionResultEnum.EXAM_NO);
+		}
+		Map<String, Object> map = new HashMap<>();
+		map.put(SystemConstant.ID, teExam.getId());
+		map.put(SystemConstant.NAME, teExam.getName());
+		return ResultUtil.ok(map);
+	}
 
-    @ApiOperation(value = "验证考试口令接口")
-    @RequestMapping(value = "/shortCode", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "考试信息", response = TEExam.class)})
-    public Result shortCode(@ApiParam(value = "考试口令", required = true) @RequestParam String shortCode) {
-        if (Objects.isNull(shortCode) || Objects.equals(shortCode, "")) {
-            throw new BusinessException(ExceptionResultEnum.SHORT_CODE_IS_NULL);
-        }
-        QueryWrapper<TEExam> teExamQueryWrapper = new QueryWrapper<>();
-        teExamQueryWrapper.lambda().eq(TEExam::getShortCode, shortCode);
-        TEExam teExam = teExamService.getOne(teExamQueryWrapper);
-        if (Objects.isNull(teExam)) {
-            throw new BusinessException(ExceptionResultEnum.EXAM_NO);
-        }
-        Map<String, Object> map = new HashMap<>();
-        map.put(SystemConstant.ID, teExam.getId());
-        map.put(SystemConstant.NAME, teExam.getName());
-        return ResultUtil.ok(map);
-    }
+	@ApiOperation(value = "获取待考列表接口")
+	@RequestMapping(value = "/waiting", method = RequestMethod.POST)
+	@ApiResponses({ @ApiResponse(code = 200, message = "考试信息", response = TEExamResultDto.class) })
+	public Result waiting() {
+		TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
+		List<TEExamDto> list = teExamService.getWaitingExam(teStudent.getId(), null, teStudent.getOrgId());
+		Map<String, Object> map = new HashMap<>();
+		if (Objects.nonNull(list) && list.size() > 0) {
+			map.put("waiting", list);
+		}
+		return ResultUtil.ok(map);
+	}
 
-    @ApiOperation(value = "获取待考列表接口")
-    @RequestMapping(value = "/waiting", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "考试信息", response = TEExamResultDto.class)})
-    public Result waiting() {
-        TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
-        List<TEExamDto> list = teExamService.getWaitingExam(teStudent.getId(), null, teStudent.getOrgId());
-        Map<String, Object> map = new HashMap<>();
-        if (Objects.nonNull(list) && list.size() > 0) {
-            map.put("waiting", list);
-        }
-        return ResultUtil.ok(map);
-    }
+	@ApiOperation(value = "开始候考")
+	@RequestMapping(value = "/prepare", method = RequestMethod.POST)
+	@ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
+	public Result prepare(@RequestBody PrepareParamBean param) {
+		TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
+		String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
+		Boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_CACHE_TIME_OUT);
+		if (!lock) {
+			throw new BusinessException(ExceptionResultEnum.REQUEST_AWAIT);
+		}
+		try {
+			if (param.getExamStudentId() == null) {
+				throw new BusinessException("考生id不能为空");
+			}
+			return ResultUtil.ok(teExamService.prepare(teStudent.getId(), param.getExamStudentId()));
+		} finally {
+			redisUtil.releaseLock(lockKey);
+		}
+	}
 
-    @ApiOperation(value = "开始候考")
-    @RequestMapping(value = "/prepare", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
-    public Result prepare(@ApiParam(value = "考生ID", required = true) @RequestParam Long examStudentId) {
-        TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
-        String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
-        Boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_CACHE_TIME_OUT);
-        if (!lock) {
-            throw new BusinessException(ExceptionResultEnum.REQUEST_AWAIT);
-        }
-        try {
-            return ResultUtil.ok(teExamService.prepare(teStudent.getId(), examStudentId));
-        } finally {
-            redisUtil.releaseLock(lockKey);
-        }
-    }
+	@ApiOperation(value = "开始考试")
+	@RequestMapping(value = "/start", method = RequestMethod.POST)
+	@ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
+	public Result start(@RequestBody ExamStartParamBean param) {
+		TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
+		String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
+		Boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_CACHE_TIME_OUT);
+		if (!lock) {
+			throw new BusinessException(ExceptionResultEnum.REQUEST_AWAIT);
+		}
+		try {
+			if (param.getRecordId() == null) {
+				throw new BusinessException("考试记录id不能为空");
+			}
+			return ResultUtil.ok(teExamService.start(teStudent.getId(), param.getRecordId()));
+		} finally {
+			redisUtil.releaseLock(lockKey);
+		}
+	}
 
-    @ApiOperation(value = "开始考试")
-    @RequestMapping(value = "/start", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
-    public Result start(@ApiParam(value = "考试记录ID", required = true) @RequestParam Long recordId,
-                               @ApiParam(value = "断点续考原因", required = false) @RequestParam String reason) {
-        TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
-        String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
-        Boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_CACHE_TIME_OUT);
-        if (!lock) {
-            throw new BusinessException(ExceptionResultEnum.REQUEST_AWAIT);
-        }
-        try {
-            return ResultUtil.ok(teExamService.start(teStudent.getId(), recordId));
-        } finally {
-            redisUtil.releaseLock(lockKey);
-        }
-    }
+	@ApiOperation(value = "上传个人试卷结构")
+	@RequestMapping(value = "/student_paper_struct/upload", method = RequestMethod.POST)
+	@ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
+	public Result studentPaperStruct(@RequestBody StudentPaperStructParamBean param) {
+		TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
+		String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
+		Boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_CACHE_TIME_OUT);
+		if (!lock) {
+			throw new BusinessException(ExceptionResultEnum.REQUEST_AWAIT);
+		}
+		try {
+			if (param.getRecordId() == null) {
+				throw new BusinessException("考试记录id不能为空");
+			}
+			if (param.getContent() == null) {
+				throw new BusinessException("试卷结构json字符串不能为空");
+			}
+			return ResultUtil
+					.ok(teExamService.studentPaperStruct(teStudent.getId(), param.getRecordId(), param.getContent()));
+		} finally {
+			redisUtil.releaseLock(lockKey);
+		}
+	}
 
-    @ApiOperation(value = "上传个人试卷结构")
-    @RequestMapping(value = "/student_paper_struct/upload", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
-    public Result studentPaperStruct(@ApiParam(value = "考试记录ID", required = true) @RequestParam Long recordId,
-                                   @ApiParam(value = "试卷结构json字符串", required = true) @RequestParam String content) {
-        TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
-        String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
-        Boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_CACHE_TIME_OUT);
-        if (!lock) {
-            throw new BusinessException(ExceptionResultEnum.REQUEST_AWAIT);
-        }
-        try {
-            return ResultUtil.ok(teExamService.studentPaperStruct(teStudent.getId(), recordId, content));
-        } finally {
-            redisUtil.releaseLock(lockKey);
-        }
-    }
+	@ApiOperation(value = "提交作答结果")
+	@RequestMapping(value = "/answer/submit", method = RequestMethod.POST)
+	@ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
+	public Result answerSubmit(@RequestBody AnswerSubmitParamBean param) {
+		TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
+		String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
+		Boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_CACHE_TIME_OUT);
+		if (!lock) {
+			throw new BusinessException(ExceptionResultEnum.REQUEST_AWAIT);
+		}
+		try {
+			if (param.getRecordId() == null) {
+				throw new BusinessException("考试记录id不能为空");
+			}
+			if (param.getMainNumber() == null) {
+				throw new BusinessException("大题号不能为空");
+			}
+			if (param.getSubNumber() == null) {
+				throw new BusinessException("小题号不能为空");
+			}
+			if (param.getAnswer() == null) {
+				throw new BusinessException("答案json字符串不能为空");
+			}
+			if (param.getVersion() == null) {
+				throw new BusinessException("时间戳不能为空");
+			}
+			Long ret = teExamService.answerSubmit(teStudent.getId(), param.getRecordId(), param.getMainNumber(),
+					param.getSubNumber(), param.getSubIndex(), param.getAnswer(), param.getVersion(),
+					param.getDurationSeconds());
+			// 发消息计算客观分
+			calculateObjectiveScore(param.getRecordId(), param.getMainNumber(), param.getSubNumber(),
+					param.getSubIndex());
+			return ResultUtil.ok(ret);
+		} finally {
+			redisUtil.releaseLock(lockKey);
+		}
+	}
 
-    @ApiOperation(value = "提交作答结果")
-    @RequestMapping(value = "/answer/submit", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
-    public Result answerSubmit(@ApiParam(value = "考试记录ID", required = true) @RequestParam Long recordId,
-                             @ApiParam(value = "大题号", required = true) @RequestParam Integer mainNumber,
-                             @ApiParam(value = "小题号", required = true) @RequestParam Integer subNumber,
-                             @ApiParam(value = "套题子题序号", required = false) @RequestParam Integer subIndex,
-                             @ApiParam(value = "答案json字符串", required = true) @RequestParam String answer,
-                             @ApiParam(value = "时间戳", required = true) @RequestParam Long version,
-                             @ApiParam(value = "作答累计秒数", required = false) @RequestParam Integer durationSeconds) {
-        TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
-        String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
-        Boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_CACHE_TIME_OUT);
-        if (!lock) {
-            throw new BusinessException(ExceptionResultEnum.REQUEST_AWAIT);
-        }
-        try {
-            Long ret = teExamService.answerSubmit(teStudent.getId(), recordId, mainNumber, subNumber, subIndex, answer, version, durationSeconds);
-            //发消息计算客观分
-            calculateObjectiveScore(recordId, mainNumber, subNumber, subIndex);
-            return ResultUtil.ok(ret);
-        } finally {
-            redisUtil.releaseLock(lockKey);
-        }
-    }
+	@ApiOperation(value = "更新音频剩余播放次数")
+	@RequestMapping(value = "/audio_left_play_count/submit", method = RequestMethod.POST)
+	@ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
+	public Result audioLeftPlayCountSubmit(@RequestBody AudioLeftPlayCountSubmitParamBean param) {
+		TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
+		String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
+		Boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_CACHE_TIME_OUT);
+		if (!lock) {
+			throw new BusinessException(ExceptionResultEnum.REQUEST_AWAIT);
+		}
+		try {
+			if (param.getRecordId() == null) {
+				throw new BusinessException("考试记录id不能为空");
+			}
+			if (param.getKey() == null) {
+				throw new BusinessException("音频标识不能为空");
+			}
+			if (param.getCount() == null) {
+				throw new BusinessException("剩余播放次数不能为空");
+			}
+			return ResultUtil.ok(teExamService.audioLeftPlayCountSubmit(teStudent.getId(), param.getRecordId(), param.getKey(), param.getCount()));
+		} finally {
+			redisUtil.releaseLock(lockKey);
+		}
+	}
 
-    @ApiOperation(value = "更新音频剩余播放次数")
-    @RequestMapping(value = "/audio_left_play_count/submit", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
-    public Result audioLeftPlayCountSubmit(@ApiParam(value = "考试记录ID", required = true) @RequestParam Long recordId,
-                                            @ApiParam(value = "音频标识", required = true) @RequestParam String key,
-                                            @ApiParam(value = "剩余播放次数", required = true) @RequestParam Integer count) {
-        TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
-        String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
-        Boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_CACHE_TIME_OUT);
-        if (!lock) {
-            throw new BusinessException(ExceptionResultEnum.REQUEST_AWAIT);
-        }
-        try {
-            return ResultUtil.ok(teExamService.audioLeftPlayCountSubmit(teStudent.getId(), recordId, key, count));
-        } finally {
-            redisUtil.releaseLock(lockKey);
-        }
-    }
+	@ApiOperation(value = "文件上传")
+	@RequestMapping(value = "/file/upload", method = RequestMethod.POST)
+	@ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
+	public Result fileUpload(@ApiParam(value = "考试记录ID", required = true) @RequestParam Long recordId,
+			@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file,
+			@ApiParam(value = "后缀名", required = true) @RequestParam String suffix,
+			@ApiParam(value = "md5", required = true) @RequestParam String md5) {
+		TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
+		String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
+		Boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_CACHE_TIME_OUT);
+		if (!lock) {
+			throw new BusinessException(ExceptionResultEnum.REQUEST_AWAIT);
+		}
+		try {
+			return ResultUtil.ok(teExamService.fileUpload(teStudent.getId(), recordId, file, suffix, md5));
+		} finally {
+			redisUtil.releaseLock(lockKey);
+		}
+	}
 
-    @ApiOperation(value = "文件上传")
-    @RequestMapping(value = "/file/upload", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
-    public Result fileUpload(@ApiParam(value = "考试记录ID", required = true) @RequestParam Long recordId,
-                                         @ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file,
-                                         @ApiParam(value = "后缀名", required = true) @RequestParam String suffix,
-                                         @ApiParam(value = "md5", required = true) @RequestParam String md5) {
-        TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
-        String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
-        Boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_CACHE_TIME_OUT);
-        if (!lock) {
-            throw new BusinessException(ExceptionResultEnum.REQUEST_AWAIT);
-        }
-        try {
-            return ResultUtil.ok(teExamService.fileUpload(teStudent.getId(), recordId, file, suffix, md5));
-        } finally {
-            redisUtil.releaseLock(lockKey);
-        }
-    }
+	@ApiOperation(value = "断点恢复")
+	@RequestMapping(value = "/resume", method = RequestMethod.POST)
+	@ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
+	public Result resume(@RequestBody ResumeParamBean param) {
+		TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
+		String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
+		Boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_CACHE_TIME_OUT);
+		if (!lock) {
+			throw new BusinessException(ExceptionResultEnum.REQUEST_AWAIT);
+		}
+		try {
+			if (param.getRecordId() == null) {
+				throw new BusinessException("考试记录id不能为空");
+			}
+			return ResultUtil.ok(teExamService.resume(teStudent.getId(), param.getRecordId()));
+		} finally {
+			redisUtil.releaseLock(lockKey);
+		}
+	}
+	
+	@ApiOperation(value = "结束考试")
+	@RequestMapping(value = "/finish", method = RequestMethod.POST)
+	@ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
+	public Result finish(@RequestBody FinishParamBean param) {
+		TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
+		String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
+		Boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_CACHE_TIME_OUT);
+		if (!lock) {
+			throw new BusinessException(ExceptionResultEnum.REQUEST_AWAIT);
+		}
+		try {
+			if (param.getRecordId() == null) {
+				throw new BusinessException("考试记录id不能为空");
+			}
+			if (param.getType() == null) {
+				throw new BusinessException("结束类型不能为空");
+			}
+			if (param.getDurationSeconds() == null) {
+				throw new BusinessException("总用时秒数不能为空");
+			}
+			Result re = ResultUtil.ok(teExamService.finish(teStudent.getId(), param.getRecordId(), param.getType(), param.getDurationSeconds()));
+			checkToPersisted(param.getRecordId());
+			return re;
+		} finally {
+			redisUtil.releaseLock(lockKey);
+		}
+	}
 
-    @ApiOperation(value = "断点恢复")
-    @RequestMapping(value = "/resume", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
-    public Result resume(@ApiParam(value = "考试记录ID", required = true) @RequestParam Long recordId) {
-        TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
-        String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
-        Boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_CACHE_TIME_OUT);
-        if (!lock) {
-            throw new BusinessException(ExceptionResultEnum.REQUEST_AWAIT);
-        }
-        try {
-            return ResultUtil.ok(teExamService.resume(teStudent.getId(), recordId));
-        } finally {
-            redisUtil.releaseLock(lockKey);
-        }
-    }
+	private void calculateObjectiveScore(Long recordId, Integer mainNumber, Integer subNumber, Integer subIndex) {
+		Map<String, Object> transMap = new HashMap<String, Object>();
+		transMap.put("recordId", recordId);
+		transMap.put("mainNumber", mainNumber);
+		transMap.put("subNumber", subNumber);
+		transMap.put("subIndex", subIndex);
+		// mq发送消息start
+		MqDto mqDto = new MqDto(MqTopicEnum.themisTopic.getCode(), MqTagEnum.calculateObjectiveScore.name(), transMap,
+				MqEnum.EXAM, null, null);
+		mqDtoService.assembleSendOneWayMsg(mqDto);
+	}
 
-    @ApiOperation(value = "结束考试")
-    @RequestMapping(value = "/finish", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
-    public Result finish(@ApiParam(value = "考试记录ID", required = true) @RequestParam Long recordId,
-                                 @ApiParam(value = "结束类型", required = true) @RequestParam String type,
-                                 @ApiParam(value = "总用时秒数", required = true) @RequestParam Integer durationSeconds) {
-        TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
-        String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
-        Boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_CACHE_TIME_OUT);
-        if (!lock) {
-            throw new BusinessException(ExceptionResultEnum.REQUEST_AWAIT);
-        }
-        try {
-        	Result re=ResultUtil.ok(teExamService.finish(teStudent.getId(), recordId, type, durationSeconds));
-        	checkToPersisted(recordId);
-            return re;
-        } finally {
-            redisUtil.releaseLock(lockKey);
-        }
-    }
+	@ApiOperation(value = "查询交卷结果")
+	@RequestMapping(value = "/result", method = RequestMethod.POST)
+	@ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
+	public Result result(@RequestBody ResultParamBean param) {
+		if (param.getRecordId() == null) {
+			throw new BusinessException("考试记录id不能为空");
+		}
+		return ResultUtil.ok(teExamService.result(param.getRecordId()));
+	}
 
-    private void calculateObjectiveScore(Long recordId, Integer mainNumber, Integer subNumber, Integer subIndex) {
-        Map<String, Object> transMap = new HashMap<String, Object>();
-        transMap.put("recordId", recordId);
-        transMap.put("mainNumber", mainNumber);
-        transMap.put("subNumber", subNumber);
-        transMap.put("subIndex", subIndex);
-        //mq发送消息start
-        MqDto mqDto = new MqDto(MqTopicEnum.themisTopic.getCode(), MqTagEnum.calculateObjectiveScore.name(), transMap, MqEnum.EXAM, null, null);
-        mqDtoService.assembleSendOneWayMsg(mqDto);
-    }
+	/**
+	 * 检查条件并发送持久化消息
+	 * 
+	 * @param recordId
+	 */
+	private void checkToPersisted(Long recordId) {
+		ExamRecordStatusEnum status = ExamRecordCacheUtil.getStatus(recordId);
+		if (!ExamRecordStatusEnum.FINISHED.equals(status)) {
+			return;
+		}
+		Double score = ExamRecordCacheUtil.getObjectiveScore(recordId);
+		if (score == null) {
+			return;
+		}
 
-    @ApiOperation(value = "查询交卷结果")
-    @RequestMapping(value = "/result", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
-    public Result result(@ApiParam(value = "考试记录ID", required = true) @RequestParam Long recordId) {
-        return ResultUtil.ok(teExamService.result(recordId));
-    }
-    
-    /**检查条件并发送持久化消息
-     * @param recordId
-     */
-    private void checkToPersisted(Long recordId) {
-    	ExamRecordStatusEnum status=ExamRecordCacheUtil.getStatus(recordId);
-    	if(!ExamRecordStatusEnum.FINISHED.equals(status)) {
-    		return;
-    	}
-    	Double score=ExamRecordCacheUtil.getObjectiveScore(recordId);
-    	if(score==null) {
-    		return;
-    	}
-    	
-    	Map<String, Object> transMap = new HashMap<String, Object>();
-        transMap.put("recordId", recordId);
-        //mq发送消息start
-        MqDto mqDto = new MqDto(MqTopicEnum.themisTopic.getCode(), MqTagEnum.examRecordPersisted.name(), transMap, MqEnum.EXAM, null, null);
-        mqDtoService.assembleSendOneWayMsg(mqDto);
-    }
+		Map<String, Object> transMap = new HashMap<String, Object>();
+		transMap.put("recordId", recordId);
+		// mq发送消息start
+		MqDto mqDto = new MqDto(MqTopicEnum.themisTopic.getCode(), MqTagEnum.examRecordPersisted.name(), transMap,
+				MqEnum.EXAM, null, null);
+		mqDtoService.assembleSendOneWayMsg(mqDto);
+	}
 }

+ 38 - 19
themis-exam/src/main/java/com/qmth/themis/exam/api/TEFaceController.java

@@ -6,14 +6,16 @@ import java.util.Map;
 import javax.annotation.Resource;
 
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import com.qmth.themis.business.bean.exam.FaceVerifyBean;
+import com.qmth.themis.business.bean.exam.FaceVerifyParamBean;
 import com.qmth.themis.business.enums.MqEnum;
 import com.qmth.themis.business.service.TOeFaceVerifyHistoryService;
+import com.qmth.themis.common.exception.BusinessException;
 import com.qmth.themis.common.util.Result;
 import com.qmth.themis.common.util.ResultUtil;
 import com.qmth.themis.mq.dto.MqDto;
@@ -23,7 +25,6 @@ import com.qmth.themis.mq.service.MqDtoService;
 
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
 import io.swagger.annotations.ApiResponse;
 import io.swagger.annotations.ApiResponses;
 
@@ -49,25 +50,43 @@ public class TEFaceController {
 	@RequestMapping(value = "/verify", method = RequestMethod.POST)
 	@ApiResponses({ @ApiResponse(code = 200, message = "人脸验证信息") })
 	@Transactional
-	public Result verify(@ApiParam(value = "考试记录ID", required = true) @RequestParam Long recordId,
-			@ApiParam(value = "FIRST_START:首次开考, RESUME_START:断点恢复, IN_PROCESS:过程中", required = true) @RequestParam String type,
-			@ApiParam(value = "照片文件URL", required = true) @RequestParam String photoUrl,
-			@ApiParam(value = "人脸数量", required = true) @RequestParam Integer faceCount,
-			@ApiParam(value = "相似度分数", required = true) @RequestParam Double similarity,
-			@ApiParam(value = "真实性结果", required = true) @RequestParam Double realness,
-			@ApiParam(value = "验证时间", required = true) @RequestParam Long time,
-			@ApiParam(value = "NONE: 无异常 FACE_COUNT_ERROR: 人脸数量异常 FACE_COMPARE_ERROR: 人脸比对异常 EYE_CLOSE_ERROR: 闭眼检测异常", required = true) @RequestParam String exception) {
-		FaceVerifyBean ret=faceVerifyHistoryService.verify(recordId,type,photoUrl,faceCount,similarity,realness,time,exception);
+	public Result verify(@RequestBody FaceVerifyParamBean param) {
+		if (param.getRecordId() == null) {
+			throw new BusinessException("考试记录id不能为空");
+		}
+		if (param.getType() == null) {
+			throw new BusinessException("type不能为空");
+		}
+		if (param.getPhotoUrl() == null) {
+			throw new BusinessException("照片文件URL不能为空");
+		}
+		if (param.getSimilarity() == null) {
+			throw new BusinessException("相似度分数不能为空");
+		}
+		if (param.getRealness() == null) {
+			throw new BusinessException("真实性结果不能为空");
+		}
+		if (param.getTime() == null) {
+			throw new BusinessException("验证时间不能为空");
+		}
+		if (param.getException() == null) {
+			throw new BusinessException("exception不能为空");
+		}
+		
+		
+		FaceVerifyBean ret = faceVerifyHistoryService.verify(param.getRecordId(), param.getType(), param.getPhotoUrl(),
+				param.getFaceCount(),
+				param.getSimilarity(),param.getRealness(),param.getTime(),param.getException());
 		Map<String, Object> transMap = new HashMap<String, Object>();
 		transMap.put("id", ret.getId());
-		transMap.put("recordId", recordId);
-		transMap.put("type", type);
-        transMap.put("photoUrl", photoUrl);
-        transMap.put("faceCount", faceCount);
-        transMap.put("similarity", similarity);
-        transMap.put("realness", realness);
-        transMap.put("time", time);
-        transMap.put("exception", exception);
+		transMap.put("recordId", param.getRecordId());
+		transMap.put("type", param.getType());
+        transMap.put("photoUrl", param.getPhotoUrl());
+        transMap.put("faceCount", param.getFaceCount());
+        transMap.put("similarity", param.getSimilarity());
+        transMap.put("realness", param.getRealness());
+        transMap.put("time", param.getTime());
+        transMap.put("exception", param.getException());
         //mq发送消息start
         MqDto mqDto = new MqDto(MqTopicEnum.themisTopic.getCode(), MqTagEnum.faceVerifySave.name(), transMap, MqEnum.EXAM, null, null);
         mqDtoService.assembleSendOneWayMsg(mqDto);

+ 36 - 18
themis-exam/src/main/java/com/qmth/themis/exam/api/TELivenessController.java

@@ -6,14 +6,16 @@ import java.util.Map;
 import javax.annotation.Resource;
 
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import com.qmth.themis.business.bean.exam.LivenessVerifyBean;
+import com.qmth.themis.business.bean.exam.LivenessVerifyParamBean;
 import com.qmth.themis.business.enums.MqEnum;
 import com.qmth.themis.business.service.TOeLivenessVerifyHistoryService;
+import com.qmth.themis.common.exception.BusinessException;
 import com.qmth.themis.common.util.Result;
 import com.qmth.themis.common.util.ResultUtil;
 import com.qmth.themis.mq.dto.MqDto;
@@ -23,7 +25,6 @@ import com.qmth.themis.mq.service.MqDtoService;
 
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
 import io.swagger.annotations.ApiResponse;
 import io.swagger.annotations.ApiResponses;
 
@@ -49,24 +50,41 @@ public class TELivenessController {
 	@RequestMapping(value = "/verify", method = RequestMethod.POST)
 	@ApiResponses({ @ApiResponse(code = 200, message = "活体验证信息") })
 	@Transactional
-	public Result verify(@ApiParam(value = "考试记录ID", required = true) @RequestParam Long recordId,
-			@ApiParam(value = "FIRST_START: 首次开考 RESUME_START: 断点恢复 IN_PROCESS: 过程中 WARNING_AUTO: 预警自动加入 INVIGILATE_MANUAL: 监考手工加入", required = true) @RequestParam String type,
-			@ApiParam(value = "动作详情", required = true) @RequestParam String actions,
-			@ApiParam(value = "整体第几次重试", required = true) @RequestParam Integer retry,
-			@ApiParam(value = "验证开始时间", required = true) @RequestParam Long startTime,
-			@ApiParam(value = "验证结束时间", required = true) @RequestParam Long finishTime,
-			@ApiParam(value = "验证异常", required = true) @RequestParam String exception) {
-		LivenessVerifyBean ret = livenessVerifyHistoryService.verify(recordId, type, actions, retry, startTime,
-				finishTime, exception);
+	public Result verify(@RequestBody LivenessVerifyParamBean param) {
+		if (param.getRecordId() == null) {
+			throw new BusinessException("考试记录id不能为空");
+		}
+		if (param.getType() == null) {
+			throw new BusinessException("type不能为空");
+		}
+		if (param.getActions() == null) {
+			throw new BusinessException("动作详情不能为空");
+		}
+		if (param.getRetry() == null) {
+			throw new BusinessException("整体第几次重试不能为空");
+		}
+		if (param.getStartTime() == null) {
+			throw new BusinessException("验证开始时间不能为空");
+		}
+		if (param.getFinishTime() == null) {
+			throw new BusinessException("验证结束时间不能为空");
+		}
+		if (param.getException() == null) {
+			throw new BusinessException("验证异常不能为空");
+		}
+
+		LivenessVerifyBean ret = livenessVerifyHistoryService.verify(param.getRecordId(), param.getType(),
+				param.getActions(), param.getRetry(), param.getStartTime(), param.getFinishTime(),
+				param.getException());
 		Map<String, Object> transMap = new HashMap<String, Object>();
 		transMap.put("id", ret.getId());
-		transMap.put("recordId", recordId);
-		transMap.put("type", type);
-		transMap.put("actions", actions);
-		transMap.put("retry", retry);
-		transMap.put("startTime", startTime);
-		transMap.put("finishTime", finishTime);
-		transMap.put("exception", exception);
+		transMap.put("recordId", param.getRecordId());
+		transMap.put("type", param.getType());
+		transMap.put("actions", param.getActions());
+		transMap.put("retry", param.getRetry());
+		transMap.put("startTime", param.getStartTime());
+		transMap.put("finishTime", param.getFinishTime());
+		transMap.put("exception", param.getException());
 		// mq发送消息start
 		MqDto mqDto = new MqDto(MqTopicEnum.themisTopic.getCode(), MqTagEnum.livenessVerifySave.name(), transMap,
 				MqEnum.EXAM, null, null);