mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-30 07:06:39 +08:00
添加模型新增校验
This commit is contained in:
parent
831b6b850a
commit
60cd549337
@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
|
|||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
import org.dromara.common.json.utils.JsonUtils;
|
import org.dromara.common.json.utils.JsonUtils;
|
||||||
import org.dromara.common.log.annotation.Log;
|
import org.dromara.common.log.annotation.Log;
|
||||||
@ -18,6 +19,7 @@ import org.flowable.engine.RepositoryService;
|
|||||||
import org.flowable.engine.repository.Model;
|
import org.flowable.engine.repository.Model;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.MultiValueMap;
|
import org.springframework.util.MultiValueMap;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -25,6 +27,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
*
|
*
|
||||||
* @author may
|
* @author may
|
||||||
*/
|
*/
|
||||||
|
@Validated
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/workflow/model")
|
@RequestMapping("/workflow/model")
|
||||||
@ -63,7 +66,7 @@ public class ActModelController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@Log(title = "模型管理", businessType = BusinessType.INSERT)
|
@Log(title = "模型管理", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/rest/models")
|
@PostMapping("/rest/models")
|
||||||
public R<Void> saveNewModel(@RequestBody ModelBo modelBo) {
|
public R<Void> saveNewModel(@Validated(AddGroup.class) @RequestBody ModelBo modelBo) {
|
||||||
return toAjax(iActModelService.saveNewModel(modelBo));
|
return toAjax(iActModelService.saveNewModel(modelBo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user