fuliqi
2024-06-07 0879a157fd7c85ec34f1dac51a2b113bf1f5f2f6
src/main/java/com/ycl/jxkg/controller/admin/ExamTemplateController.java
@@ -50,6 +50,10 @@
    @PutMapping
    @ApiOperation(value = "修改", notes = "修改")
    public Result update(@RequestBody @Validated(Update.class) ExamTemplateForm form) {
        //参数校验
        if(form.getDeductType()!=null && (form.getDeductType() ==PartCorrect.getCode() || form.getDeductType() == EachCorrect.getCode()) && (form.getDeductTypeScore() ==null || form.getDeductTypeScore().compareTo(BigDecimal.ZERO) <= 0)){
            return Result.fail(SystemCode.ParameterValidError.getCode(),"多选评分不能为0或空");
        }
        return examTemplateService.update(form);
    }