zhongjiajie commented on code in PR #12116:
URL: https://github.com/apache/dolphinscheduler/pull/12116#discussion_r983234383
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessTaskRelationServiceImpl.java:
##########
@@ -165,6 +174,84 @@ public Map<String, Object> createProcessTaskRelation(User
loginUser, long projec
return result;
}
+ private ProcessTaskRelationLog syncObj2Log(User user, ProcessTaskRelation
processTaskRelation) {
Review Comment:
i am here use key word `persist` instead of `convert`, the keyword of this
method is to persist `task relation log` into database instead of covert to
`task relation log`, the reason we return `task relation log` it is for
convenient, and we should renturn some thing when we created a new record
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessTaskRelationServiceImpl.java:
##########
@@ -165,6 +174,84 @@ public Map<String, Object> createProcessTaskRelation(User
loginUser, long projec
return result;
}
+ private ProcessTaskRelationLog syncObj2Log(User user, ProcessTaskRelation
processTaskRelation) {
+ ProcessTaskRelationLog processTaskRelationLog = new
ProcessTaskRelationLog(processTaskRelation);
+ processTaskRelationLog.setOperator(user.getId());
+ processTaskRelationLog.setOperateTime(new Date());
+ int result =
processTaskRelationLogMapper.insert(processTaskRelationLog);
+ if (result <= 0) {
+ throw new
ServiceException(Status.CREATE_PROCESS_TASK_RELATION_LOG_ERROR,
+ processTaskRelationLog.getPreTaskCode(),
processTaskRelationLog.getPostTaskCode());
+ }
+ return processTaskRelationLog;
+ }
+
+ private List<ProcessTaskRelationLog> batchSyncObj2Log(User user,
List<ProcessTaskRelation> processTaskRelations) {
Review Comment:
same as above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]