use of com.dtstack.taier.develop.dto.devlop.BatchFunctionVO in project Taier by DTStack.
the class BatchFunctionService method getFunction.
/**
* 根据id获取函数
* @param functionId
* @return
*/
public BatchFunctionVO getFunction(Long functionId) {
BatchFunction batchFunction = developFunctionDao.getOne(functionId);
if (Objects.isNull(batchFunction)) {
return new BatchFunctionVO();
}
BatchFunctionVO vo = BatchFunctionVO.toVO(batchFunction);
// 如果函数有资源,则设置函数的资源
BatchFunctionResource resourceFunctionByFunctionId = batchFunctionResourceService.getResourceFunctionByFunctionId(batchFunction.getId());
if (Objects.nonNull(resourceFunctionByFunctionId)) {
vo.setResources(resourceFunctionByFunctionId.getResourceId());
}
vo.setCreateUser(userService.getById(batchFunction.getCreateUserId()));
vo.setModifyUser(userService.getById(batchFunction.getModifyUserId()));
return vo;
}
Aggregations