📖 CRM:code review 合同的代码实现

This commit is contained in:
YunaiV
2024-02-04 12:57:26 +08:00
parent 3347d3320d
commit bf8ec22144
6 changed files with 26 additions and 39 deletions

View File

@ -43,17 +43,6 @@ public class BpmModelController {
return success(model);
}
// TODO @puhui999这个接口的目的是啥呀业务表单预览流程🤣
// TODO @puhui999捉摸是不是搞成前端跳转过去不另外做 bpmn 组件哈;
@GetMapping("/get-by-key")
@Operation(summary = "获得模型")
@Parameter(name = "key", description = "流程标识", required = true, example = "oa_leave")
@PreAuthorize("@ss.hasPermission('bpm:model:query')")
public CommonResult<BpmModelRespVO> getModelByKey(@RequestParam("key") String key) {
BpmModelRespVO model = modelService.getBpmnModelByKey(key);
return success(model);
}
@PostMapping("/create")
@Operation(summary = "新建模型")
@PreAuthorize("@ss.hasPermission('bpm:model:create')")

View File

@ -37,14 +37,6 @@ public interface BpmModelService {
*/
BpmModelRespVO getModel(String id);
/**
* 获得流程模块
*
* @param key 流程标识
* @return 流程模型
*/
BpmModelRespVO getBpmnModelByKey(String key);
/**
* 修改流程模型
*

View File

@ -134,19 +134,6 @@ public class BpmModelServiceImpl implements BpmModelService {
return modelRespVO;
}
@Override
public BpmModelRespVO getBpmnModelByKey(String key) {
Model model = getModelByKey(key);
if (model == null) {
return null;
}
BpmModelRespVO modelRespVO = BpmModelConvert.INSTANCE.convert(model);
// 拼接 bpmn XML
byte[] bpmnBytes = repositoryService.getModelEditorSource(model.getId());
modelRespVO.setBpmnXml(StrUtil.utf8Str(bpmnBytes));
return modelRespVO;
}
@Override
@Transactional(rollbackFor = Exception.class) // 因为进行多个操作,所以开启事务
public void updateModel(@Valid BpmModelUpdateReqVO updateReqVO) {