update - 调整 form 表单定义相关接口
This commit is contained in:
parent
a3a693461c
commit
414f79a634
@ -7,6 +7,7 @@ import cn.axzo.workflow.core.service.dto.response.BpmPageResult;
|
||||
import org.flowable.form.api.FormDeployment;
|
||||
import org.flowable.form.api.FormInfo;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -18,7 +19,13 @@ import java.util.List;
|
||||
public interface BpmFormDefinitionService {
|
||||
String createFormModel(FormModelCreateDTO dto);
|
||||
|
||||
String updateFormModel(FormModelUpdateDTO dto);
|
||||
void updateFormModel(FormModelUpdateDTO dto);
|
||||
|
||||
void deleteFormModel(String formModelId, String tenantId);
|
||||
|
||||
String deployFormModelById(String formModelId, @Nullable String tenantId);
|
||||
|
||||
String deployFormModelByKey(String formModelKey, @Nullable String tenantId);
|
||||
|
||||
BpmPageResult<FormDeployment> listFormModel(FormModelSearchDTO dto);
|
||||
|
||||
|
||||
@ -8,6 +8,8 @@ import cn.axzo.workflow.core.service.dto.response.model.BpmModelDetailVO;
|
||||
import cn.axzo.workflow.core.service.dto.response.model.BpmModelPageItemVO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@ApiOperation("流程模型 - 部署流程")
|
||||
public interface BpmModelService {
|
||||
|
||||
@ -36,24 +38,24 @@ public interface BpmModelService {
|
||||
|
||||
/**
|
||||
* 修改流程信息
|
||||
* */
|
||||
*/
|
||||
void updateBpmModel(BpmModelUpdateDTO updateDTO);
|
||||
|
||||
/**
|
||||
* 部署模型
|
||||
* return 部署完成的流程定义Id
|
||||
* */
|
||||
String deployBpmModelById(String modelId);
|
||||
*/
|
||||
String deployBpmModelById(String modelId, @Nullable String tenantId);
|
||||
|
||||
/**
|
||||
* 部署模型
|
||||
* return 部署完成的流程定义Id
|
||||
* */
|
||||
String deployBpmModelByKey(String modelKey);
|
||||
*/
|
||||
String deployBpmModelByKey(String modelKey, @Nullable String tenantId);
|
||||
|
||||
/**
|
||||
* 删除模型
|
||||
* */
|
||||
void deleteBpmModel(String id);
|
||||
*/
|
||||
void deleteBpmModel(String modelId, String tenantId);
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
package cn.axzo.workflow.core.service.dto.request.form;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*
|
||||
* @author wangli
|
||||
* @sine 2023/7/24 22:36
|
||||
*/
|
||||
@Data
|
||||
public class FormDefinitionDTO {
|
||||
@ApiModelProperty(value = "表单定义的key", hidden = true)
|
||||
private transient String key;
|
||||
|
||||
@ApiModelProperty(value = "表单定义的名称", hidden = true)
|
||||
private transient String name;
|
||||
|
||||
@ApiModelProperty(value = "表单定义的具体字段项", example = "[{'': '''}]")
|
||||
private List<FormFieldsDTO> formFields;
|
||||
|
||||
}
|
||||
@ -11,9 +11,10 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class FormFieldsCreateDTO {
|
||||
public class FormFieldsDTO {
|
||||
|
||||
@ApiModelProperty(value = "表单字段类型", hidden = true)
|
||||
@NotBlank(message = "字段类型不能为空")
|
||||
@ -29,7 +30,7 @@ public class FormFieldsCreateDTO {
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "表单字段默认值", example = "account")
|
||||
private String defaultValue;
|
||||
private String value;
|
||||
|
||||
@ApiModelProperty(value = "表单字段是否必填,默认 false", example = "true or false")
|
||||
private Boolean required = false;
|
||||
@ -37,6 +38,9 @@ public class FormFieldsCreateDTO {
|
||||
@ApiModelProperty(value = "表单字段是否只读,默认 false", example = "true or false")
|
||||
private Boolean readOnly = false;
|
||||
|
||||
@ApiModelProperty(value = "表单字段占位提示")
|
||||
private String placeholder;
|
||||
|
||||
@ApiModelProperty(value = "该表单字段的其他扩展属性,期望 JSON 格式")
|
||||
private String params;
|
||||
private Map<String, Object> params;
|
||||
}
|
||||
@ -2,11 +2,9 @@ package cn.axzo.workflow.core.service.dto.request.form;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 表单模型创建入参模型
|
||||
@ -17,6 +15,11 @@ import java.util.List;
|
||||
@Data
|
||||
public class FormModelCreateDTO {
|
||||
|
||||
@ApiModelProperty(value = "流程表单标识", example = "form_key", hidden = true)
|
||||
@Length(max = 255, message = "流程表单标识最长只支持255个字符")
|
||||
@NotBlank(message = "流程表单 key 不能为空")
|
||||
private String key;
|
||||
|
||||
@ApiModelProperty(value = "表单名称", example = "第一个表单")
|
||||
@NotBlank(message = "表单名称不能为空")
|
||||
private String name;
|
||||
@ -24,15 +27,8 @@ public class FormModelCreateDTO {
|
||||
@ApiModelProperty(value = "表单分类", example = "business_form_key")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value = "一个表单中的多页(tab)", example = "{'form1':[{}]},{'form2':[{}]}")
|
||||
@NotEmpty(message = "至少存在一个表单页")
|
||||
@Valid
|
||||
private List<FormSheetCreateDTO> formSheets;
|
||||
|
||||
@ApiModelProperty(value = "描述信息", example = "这是第一个表单哦", hidden = true)
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(value = "租户 ID", example = "1")
|
||||
@NotBlank(message = "租户 ID 不能为空")
|
||||
private String tenantId;
|
||||
|
||||
}
|
||||
|
||||
@ -16,5 +16,8 @@ public class FormModelUpdateDTO extends FormModelCreateDTO {
|
||||
|
||||
@ApiModelProperty("表单ID")
|
||||
@NotBlank(message = "表单 ID 不能为空")
|
||||
public String id;
|
||||
public String formModelId;
|
||||
|
||||
@ApiModelProperty(value = "表单定义内容", hidden = true)
|
||||
private FormDefinitionDTO formDefinition;
|
||||
}
|
||||
|
||||
@ -28,5 +28,5 @@ public class FormSheetCreateDTO {
|
||||
@ApiModelProperty(value = "具体表单项")
|
||||
@NotEmpty(message = "表单项不能为空")
|
||||
@Valid
|
||||
private List<FormFieldsCreateDTO> fields;
|
||||
private List<FormFieldsDTO> fields;
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ import javax.validation.constraints.NotBlank;
|
||||
@Data
|
||||
public class BpmModelCreateDTO {
|
||||
|
||||
@ApiModelProperty(value = "流程模型标识", notes = "前端不用填写", example = "process_yudao", hidden = true)
|
||||
@ApiModelProperty(value = "流程模型标识", example = "process_key", hidden = true)
|
||||
@Length(max = 255, message = "流程标识最长只支持255个字符")
|
||||
@NotBlank(message = "流程模型表示不能为空")
|
||||
private String key;
|
||||
@ -49,5 +49,6 @@ public class BpmModelCreateDTO {
|
||||
* 租户Id
|
||||
* */
|
||||
@ApiModelProperty(value = "租户Id", example = "1")
|
||||
@NotBlank(message = "租户 ID 不能为空")
|
||||
private String tenantId;
|
||||
}
|
||||
|
||||
@ -2,27 +2,28 @@ package cn.axzo.workflow.core.service.impl;
|
||||
|
||||
import cn.axzo.workflow.core.common.exception.WorkflowEngineException;
|
||||
import cn.axzo.workflow.core.service.BpmFormDefinitionService;
|
||||
import cn.axzo.workflow.core.service.dto.request.form.FormDefinitionDTO;
|
||||
import cn.axzo.workflow.core.service.dto.request.form.FormModelCreateDTO;
|
||||
import cn.axzo.workflow.core.service.dto.request.form.FormModelSearchDTO;
|
||||
import cn.axzo.workflow.core.service.dto.request.form.FormModelUpdateDTO;
|
||||
import cn.axzo.workflow.core.service.dto.response.BpmPageResult;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.flowable.engine.RepositoryService;
|
||||
import org.flowable.engine.TaskService;
|
||||
import org.flowable.engine.repository.Model;
|
||||
import org.flowable.engine.repository.ModelQuery;
|
||||
import org.flowable.form.api.*;
|
||||
import org.flowable.form.engine.impl.persistence.entity.FormDeploymentEntityImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.flowable.form.model.SimpleFormModel;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 表单定义 Service 实现
|
||||
@ -35,47 +36,111 @@ import java.util.Objects;
|
||||
@RequiredArgsConstructor
|
||||
public class BpmFormDefinitionServiceImpl implements BpmFormDefinitionService {
|
||||
|
||||
@Autowired
|
||||
@Resource
|
||||
private FormRepositoryService formRepositoryService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private RepositoryService repositoryService;
|
||||
@Resource
|
||||
private ObjectMapper objectMapper;
|
||||
@Resource
|
||||
private FormService formService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private TaskService taskService;
|
||||
|
||||
@Override
|
||||
public String createFormModel(FormModelCreateDTO dto) {
|
||||
FormDeploymentBuilder builder = formRepositoryService.createDeployment()
|
||||
.name(dto.getName())
|
||||
.category(dto.getCategory());
|
||||
List<String> keys = new ArrayList<>();
|
||||
dto.getFormSheets().forEach(i -> {
|
||||
if (keys.contains(i.getKey())) {
|
||||
throw new WorkflowEngineException("表单内的页的 key 不允许重复!");
|
||||
}
|
||||
keys.add(i.getKey());
|
||||
builder.addFormDefinition(i.getKey() + ".form", JSON.toJSONString(i));
|
||||
});
|
||||
if (StringUtils.hasLength(dto.getTenantId())) {
|
||||
builder.tenantId(dto.getTenantId());
|
||||
Model persistModel = repositoryService.createModelQuery()
|
||||
.modelKey(dto.getKey())
|
||||
.modelTenantId(dto.getTenantId())
|
||||
.singleResult();
|
||||
if (Objects.nonNull(persistModel)) {
|
||||
throw new WorkflowEngineException("存在指定 key 的表单模型");
|
||||
}
|
||||
FormDeployment deploy = builder.deploy();
|
||||
Model model = repositoryService.newModel();
|
||||
model.setKey(dto.getKey());
|
||||
model.setCategory(dto.getCategory());
|
||||
model.setName(dto.getName());
|
||||
model.setTenantId(dto.getTenantId());
|
||||
repositoryService.saveModel(model);
|
||||
try {
|
||||
repositoryService.addModelEditorSource(model.getId(),
|
||||
objectMapper.writeValueAsString(new SimpleFormModel()).getBytes());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new WorkflowEngineException(e.getMessage());
|
||||
}
|
||||
|
||||
return model.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateFormModel(FormModelUpdateDTO dto) {
|
||||
Model model = repositoryService.createModelQuery()
|
||||
.modelId(dto.getFormModelId())
|
||||
.modelTenantId(dto.getTenantId())
|
||||
.singleResult();
|
||||
if (Objects.isNull(model)) {
|
||||
throw new WorkflowEngineException("表单模型不存在");
|
||||
}
|
||||
|
||||
FormDefinitionDTO formDefinition = dto.getFormDefinition();
|
||||
formDefinition.setKey(model.getKey());
|
||||
formDefinition.setName(dto.getName());
|
||||
|
||||
model.setName(dto.getName());
|
||||
model.setCategory(dto.getCategory());
|
||||
|
||||
try {
|
||||
repositoryService.addModelEditorSource(model.getId(),
|
||||
objectMapper.writeValueAsString(formDefinition).getBytes());
|
||||
} catch (Exception e) {
|
||||
throw new WorkflowEngineException(e.getMessage());
|
||||
}
|
||||
repositoryService.saveModel(model);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteFormModel(String formModelId, String tenantId) {
|
||||
Model model = repositoryService.getModel(formModelId);
|
||||
if (Objects.isNull(model) || !Objects.equals(model.getTenantId(), tenantId)) {
|
||||
throw new WorkflowEngineException("模型不存在");
|
||||
}
|
||||
repositoryService.deleteModel(formModelId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String deployFormModelById(String formModelId, String tenantId) {
|
||||
Model model = repositoryService.getModel(formModelId);
|
||||
if (Objects.isNull(model) || !Objects.equals(model.getTenantId(), tenantId)) {
|
||||
throw new WorkflowEngineException("模型不存在");
|
||||
}
|
||||
FormDeployment deploy = formRepositoryService.createDeployment()
|
||||
.addFormDefinition(model.getKey() + ".form",
|
||||
Arrays.toString(repositoryService.getModelEditorSource(model.getId())))
|
||||
.name(model.getName())
|
||||
.category(model.getCategory())
|
||||
.tenantId(model.getTenantId())
|
||||
.deploy();
|
||||
|
||||
return deploy.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String updateFormModel(FormModelUpdateDTO dto) {
|
||||
FormDeploymentQuery query = formRepositoryService.createDeploymentQuery()
|
||||
.deploymentId(dto.id);
|
||||
if (StringUtils.hasLength(dto.getTenantId())) {
|
||||
query.deploymentTenantId(dto.getTenantId());
|
||||
public String deployFormModelByKey(String formModelKey, String tenantId) {
|
||||
ModelQuery modelQuery = repositoryService.createModelQuery()
|
||||
.modelKey(formModelKey);
|
||||
if (StringUtils.hasLength(tenantId)) {
|
||||
modelQuery.modelTenantId(tenantId);
|
||||
}
|
||||
FormDeploymentEntityImpl formDeployment = (FormDeploymentEntityImpl) query.singleResult();
|
||||
if (Objects.isNull(formDeployment)) {
|
||||
throw new WorkflowEngineException("表单模型不存在");
|
||||
Model model = modelQuery.singleResult();
|
||||
if (Objects.isNull(model)) {
|
||||
throw new WorkflowEngineException("模型不存在");
|
||||
}
|
||||
formRepositoryService.deleteDeployment(dto.getId());
|
||||
return createFormModel(dto);
|
||||
|
||||
return deployFormModelById(model.getId(), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -11,17 +11,18 @@ import cn.axzo.workflow.core.service.dto.request.model.BpmModelUpdateDTO;
|
||||
import cn.axzo.workflow.core.service.dto.response.BpmPageResult;
|
||||
import cn.axzo.workflow.core.service.dto.response.model.BpmModelDetailVO;
|
||||
import cn.axzo.workflow.core.service.dto.response.model.BpmModelPageItemVO;
|
||||
import cn.azxo.framework.common.utils.StringUtils;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import org.flowable.common.engine.impl.db.SuspensionState;
|
||||
import org.flowable.engine.RepositoryService;
|
||||
import org.flowable.engine.repository.Deployment;
|
||||
import org.flowable.engine.repository.Model;
|
||||
import org.flowable.engine.repository.ModelQuery;
|
||||
import org.flowable.engine.repository.ProcessDefinition;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
@ -47,7 +48,10 @@ public class BpmModelServiceImpl implements BpmModelService {
|
||||
@Override
|
||||
public String createBpmModel(@Valid BpmModelCreateDTO dto) {
|
||||
|
||||
Model existModel = repositoryService.createModelQuery().modelKey(dto.getKey()).singleResult();
|
||||
Model existModel = repositoryService.createModelQuery()
|
||||
.modelKey(dto.getKey())
|
||||
.modelTenantId(dto.getTenantId())
|
||||
.singleResult();
|
||||
if (!ObjectUtils.isEmpty(existModel)) {
|
||||
throw new WorkflowEngineException(MODEL_KEY_EXISTS, dto.getKey());
|
||||
}
|
||||
@ -108,7 +112,9 @@ public class BpmModelServiceImpl implements BpmModelService {
|
||||
|
||||
@Override
|
||||
public void updateBpmModel(BpmModelUpdateDTO dto) {
|
||||
Model originModel = repositoryService.createModelQuery().modelId(dto.getId()).singleResult();
|
||||
Model originModel = repositoryService.createModelQuery()
|
||||
.modelId(dto.getId())
|
||||
.singleResult();
|
||||
if (ObjectUtils.isEmpty(originModel)) {
|
||||
throw new WorkflowEngineException(MODEL_ID_NOT_EXISTS, dto.getId());
|
||||
}
|
||||
@ -128,9 +134,9 @@ public class BpmModelServiceImpl implements BpmModelService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String deployBpmModelById(String modelId) {
|
||||
public String deployBpmModelById(String modelId, String tenantId) {
|
||||
Model model = this.repositoryService.getModel(modelId);
|
||||
if (ObjectUtils.isEmpty(model)) {
|
||||
if (Objects.isNull(model) || Objects.equals(model.getTenantId(), tenantId)) {
|
||||
throw new WorkflowEngineException(MODEL_ID_NOT_EXISTS);
|
||||
}
|
||||
|
||||
@ -149,27 +155,33 @@ public class BpmModelServiceImpl implements BpmModelService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String deployBpmModelByKey(String modelKey) {
|
||||
Model model = repositoryService.createModelQuery().modelKey(modelKey).singleResult();
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String deployBpmModelByKey(String modelKey, String tenantId) {
|
||||
ModelQuery modelQuery = repositoryService.createModelQuery()
|
||||
.modelKey(modelKey);
|
||||
if (StringUtils.hasLength(tenantId)) {
|
||||
modelQuery.modelTenantId(tenantId);
|
||||
}
|
||||
Model model = modelQuery.singleResult();
|
||||
if (Objects.isNull(model)) {
|
||||
throw new WorkflowEngineException(MODEL_KEY_NOT_EXISTS, modelKey);
|
||||
}
|
||||
return deployBpmModelById(model.getId());
|
||||
return deployBpmModelById(model.getId(), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBpmModel(String id) {
|
||||
public void deleteBpmModel(String modelId, String tenantId) {
|
||||
// 校验流程模型存在
|
||||
Model model = repositoryService.getModel(id);
|
||||
if (model == null) {
|
||||
Model model = repositoryService.getModel(modelId);
|
||||
if (Objects.isNull(model) || !Objects.equals(model.getTenantId(), tenantId)) {
|
||||
throw new WorkflowEngineException(MODEL_ID_NOT_EXISTS);
|
||||
}
|
||||
// 执行删除
|
||||
repositoryService.deleteModel(id);
|
||||
repositoryService.deleteModel(modelId);
|
||||
}
|
||||
|
||||
private void saveModelBpmnXml(Model model, String bpmnXml) {
|
||||
if (!StringUtils.isBlank(bpmnXml)) {
|
||||
if (StringUtils.hasLength(bpmnXml)) {
|
||||
saveModelBpmnXml(model, bpmnXml.getBytes());
|
||||
}
|
||||
}
|
||||
@ -181,7 +193,7 @@ public class BpmModelServiceImpl implements BpmModelService {
|
||||
}
|
||||
|
||||
private void updateProcessDefinitionSuspended(String deploymentId) {
|
||||
if (!StringUtils.isBlank(deploymentId)) {
|
||||
if (StringUtils.hasLength(deploymentId)) {
|
||||
ProcessDefinition oldDefinition =
|
||||
this.processDefinitionService.getProcessDefinitionByDeploymentId(deploymentId);
|
||||
if (oldDefinition != null) {
|
||||
|
||||
@ -35,8 +35,9 @@ public class BpmFormDefinitionController {
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
public CommonResponse<String> updateFormModel(@Valid @RequestBody FormModelUpdateDTO dto) {
|
||||
return CommonResponse.success(bpmFormDefinitionService.updateFormModel(dto));
|
||||
public CommonResponse<Void> updateFormModel(@Valid @RequestBody FormModelUpdateDTO dto) {
|
||||
bpmFormDefinitionService.updateFormModel(dto);
|
||||
return CommonResponse.success();
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
|
||||
@ -103,7 +103,7 @@ public class BpmModelController {
|
||||
@PostMapping("/deploy")
|
||||
public CommonResponse<String> deployBpmModelById(@Valid @NotBlank(message = "模型 ID 不能为空") @RequestParam String modelId) {
|
||||
log.info("部署模型deployBpmModelById===>>>参数:{}", JSON.toJSONString(modelId));
|
||||
String result = bpmModelService.deployBpmModelById(modelId);
|
||||
String result = bpmModelService.deployBpmModelById(modelId, null);
|
||||
return CommonResponse.success(result);
|
||||
}
|
||||
|
||||
@ -114,9 +114,10 @@ public class BpmModelController {
|
||||
*/
|
||||
@Operation(summary = "通过模型KEY部署流程")
|
||||
@PostMapping("/deployByKey")
|
||||
public CommonResponse<String> deployBpmModelByKey(@Valid @NotBlank(message = "模型 Key 不能为空") @RequestParam String modelKey) {
|
||||
public CommonResponse<String> deployBpmModelByKey(@Valid @NotBlank(message = "模型 Key 不能为空") @RequestParam String modelKey,
|
||||
@RequestParam String tenantId) {
|
||||
log.info("部署模型deployBpmModelByKey===>>>参数:{}", JSON.toJSONString(modelKey));
|
||||
String result = bpmModelService.deployBpmModelByKey(modelKey);
|
||||
String result = bpmModelService.deployBpmModelByKey(modelKey, tenantId);
|
||||
return CommonResponse.success(result);
|
||||
}
|
||||
|
||||
@ -126,9 +127,9 @@ public class BpmModelController {
|
||||
*/
|
||||
@Operation(summary = "删除指定模型ID的模型")
|
||||
@DeleteMapping("/delete")
|
||||
public CommonResponse deleteBpmModel(@RequestParam String id) {
|
||||
public CommonResponse<Void> deleteBpmModel(@RequestParam String id) {
|
||||
log.info("删除模型deleteBpmModel===>>>参数:{}", JSON.toJSONString(id));
|
||||
bpmModelService.deleteBpmModel(id);
|
||||
bpmModelService.deleteBpmModel(id, null);
|
||||
return CommonResponse.success();
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user