update 调整模型修改

This commit is contained in:
gssong 2024-02-03 13:46:29 +08:00
parent 1601ea096e
commit d93d3beb48
2 changed files with 2 additions and 3 deletions

View File

@ -78,7 +78,7 @@ public class ActModelController extends BaseController {
*/
@Log(title = "模型管理", businessType = BusinessType.UPDATE)
@RepeatSubmit()
@PostMapping(value = "/update")
@PutMapping(value = "/update")
public R<Void> update(@RequestBody ModelBo modelBo) {
return toAjax(actModelService.update(modelBo));
}

View File

@ -114,6 +114,7 @@ public class ActModelServiceImpl implements IActModelService {
model.setVersion(version);
model.setCategory(categoryCode);
model.setMetaInfo(description);
model.setTenantId(TenantHelper.getTenantId());
//保存初始化的模型基本信息数据
repositoryService.saveModel(model);
repositoryService.addModelEditorSource(model.getId(), StrUtil.utf8Bytes(xml));
@ -165,8 +166,6 @@ public class ActModelServiceImpl implements IActModelService {
list.stream().filter(e -> !e.getId().equals(model.getId())).findFirst().ifPresent(e -> {
throw new ServiceException("模型KEY已存在");
});
model.setKey(modelBo.getKey());
model.setName(modelBo.getName());
model.setCategory(modelBo.getCategoryCode());
model.setMetaInfo(modelBo.getDescription());
repositoryService.saveModel(model);