Skip to content

Commit

Permalink
Refactor 1
Browse files Browse the repository at this point in the history
  • Loading branch information
vivianzheng010 committed Jul 13, 2023
1 parent 57ed3c9 commit 1ac05c0
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,9 @@ private void insertOrUpdatescheduleWorkflowDef(Connection tx, ScheduleWfDef def)
.addParameter(def.getStatus() != null ? def.getStatus().name() : null)
.addJsonParameter(def).addParameter(def.getCronExpression()).executeUpdate());
} else {
final String UPDATE_WORKFLOW_DEF_QUERY = "UPDATE schedule_wf_def "
+ "SET json_input = ?,status=?, cron_expression=?, version=?, updated_on = CURRENT_TIMESTAMP "
+ "WHERE name = ?";

final String UPDATE_WORKFLOW_DEF_QUERY = "UPDATE schedule_wf_def "
+ "SET json_input = ?,status=?, cron_expression=?, version=?, updated_on = CURRENT_TIMESTAMP "
+ "WHERE name = ?";
execute(tx, UPDATE_WORKFLOW_DEF_QUERY,
q -> q.addJsonParameter(def)
.addParameter(def.getStatus() != null ? def.getStatus().name() : null)
Expand Down

0 comments on commit 1ac05c0

Please sign in to comment.