@Data public class ResetForm { /**XXXXX*/ @NotNull @ApiModelProperty(value = "XXXXX") private String overCheckSerialNum; /**XXXXX1-9*/ @NotNull @ApiModelProperty(value = "XXXXX") private String overCheckSteps; }
@ApiOperation(value = "XXXXX", notes = "XXXXX") @GetMapping(value = "/reset") public Result<?> reset(@Validated ResetForm form, BindingResult bindingResult) { if (bindingResult.hasErrors()){ List<ObjectError> allErrors = bindingResult.getAllErrors(); log.info(JSONObject.toJSONString(allErrors)); return Result.error(bindingResult.getFieldError().getField()+bindingResult.getFieldError().getDefaultMessage()); } return overCheckRecordService.reset(form); }