Navigation Menu

Skip to content

Commit

Permalink
0002535: Some SQL has sym_ hardcoded in table name
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Mar 24, 2016
1 parent b65e386 commit 27fae74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -110,16 +110,16 @@ public OutgoingBatchServiceSqlMap(IDatabasePlatform platform,
"select b.load_id, b.node_id, b.status, b.create_by, max(error_flag) as error_flag, count(*) as cnt, min(b.create_time) as create_time, "
+ " max(b.last_update_time) as last_update_time, min(b.batch_id) as current_batch_id, "
+ " min(b.data_event_count) as current_data_event_count "
+ "from sym_outgoing_batch b inner join "
+ " sym_data_event e on b.batch_id=e.batch_id inner join "
+ " sym_data d on d.data_id=e.data_id "
+ "from $(outgoing_batch) b inner join "
+ " $(data_event) e on b.batch_id=e.batch_id inner join "
+ " $(data) d on d.data_id=e.data_id "
+ "where b.channel_id='reload' "
+ "group by b.load_id, b.node_id, b.status, b.create_by "
+ "order by b.load_id desc ");

putSql("getNextOutgoingBatchForEachNodeSql",
"select min(b.batch_id) as batch_id, b.node_id, b.status, b.channel_id "
+ " from sym_outgoing_batch b where status != 'OK' and status != 'RT' "
+ " from $(outgoing_batch) b where status != 'OK' and status != 'RT' "
+ " group by b.node_id, b.status, b.channel_id");

putSql("deleteOutgoingBatchesForNodeSql",
Expand Down
Expand Up @@ -32,7 +32,7 @@ public PurgeServiceSqlMap(IDatabasePlatform platform, Map<String, String> replac
// @formatter:off

putSql("deleteExtractRequestSql", "delete from $(extract_request) where status=? and last_update_time < ? and "
+ "0 = (select count(1) from sym_outgoing_batch where status != 'OK' and batch_id between $(extract_request).start_batch_id and $(extract_request).end_batch_id)");
+ "0 = (select count(1) from $(outgoing_batch) where status != 'OK' and batch_id between $(extract_request).start_batch_id and $(extract_request).end_batch_id)");

putSql("deleteRegistrationRequestSql", "delete from $(registration_request) where status in (?,?,?) and last_update_time < ?");

Expand Down

0 comments on commit 27fae74

Please sign in to comment.