mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-21 10:35:57 +08:00
update 调整模型修改
This commit is contained in:
parent
1601ea096e
commit
d93d3beb48
@ -78,7 +78,7 @@ public class ActModelController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@Log(title = "模型管理", businessType = BusinessType.UPDATE)
|
@Log(title = "模型管理", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping(value = "/update")
|
@PutMapping(value = "/update")
|
||||||
public R<Void> update(@RequestBody ModelBo modelBo) {
|
public R<Void> update(@RequestBody ModelBo modelBo) {
|
||||||
return toAjax(actModelService.update(modelBo));
|
return toAjax(actModelService.update(modelBo));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -114,6 +114,7 @@ public class ActModelServiceImpl implements IActModelService {
|
|||||||
model.setVersion(version);
|
model.setVersion(version);
|
||||||
model.setCategory(categoryCode);
|
model.setCategory(categoryCode);
|
||||||
model.setMetaInfo(description);
|
model.setMetaInfo(description);
|
||||||
|
model.setTenantId(TenantHelper.getTenantId());
|
||||||
//保存初始化的模型基本信息数据
|
//保存初始化的模型基本信息数据
|
||||||
repositoryService.saveModel(model);
|
repositoryService.saveModel(model);
|
||||||
repositoryService.addModelEditorSource(model.getId(), StrUtil.utf8Bytes(xml));
|
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 -> {
|
list.stream().filter(e -> !e.getId().equals(model.getId())).findFirst().ifPresent(e -> {
|
||||||
throw new ServiceException("模型KEY已存在!");
|
throw new ServiceException("模型KEY已存在!");
|
||||||
});
|
});
|
||||||
model.setKey(modelBo.getKey());
|
|
||||||
model.setName(modelBo.getName());
|
|
||||||
model.setCategory(modelBo.getCategoryCode());
|
model.setCategory(modelBo.getCategoryCode());
|
||||||
model.setMetaInfo(modelBo.getDescription());
|
model.setMetaInfo(modelBo.getDescription());
|
||||||
repositoryService.saveModel(model);
|
repositoryService.saveModel(model);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user