自动上线筛选逻辑调整
Showing
1 changed file
with
5 additions
and
1 deletions
... | @@ -28,7 +28,11 @@ public class AutoOnlineProcessor { | ... | @@ -28,7 +28,11 @@ public class AutoOnlineProcessor { |
28 | try { | 28 | try { |
29 | connection = dbUtil.getConnection(); | 29 | connection = dbUtil.getConnection(); |
30 | // 查询未绑定 | 30 | // 查询未绑定 |
31 | String sql = StrUtil.format(" update `x_media` set `status` = '001',`update_time` = '{}' where `status` = '000' and file_status = '001' and (update_time - create_time) < {} and create_time >= ? ", DateUtil.now(), DIFFERENCE); | 31 | String sql = StrUtil.format(" update `x_media` set `status` = '001',`update_time` = '{}' " + |
32 | "where id in ( select a.id from " + | ||
33 | "(select xm.id from `x_media` xm LEFT JOIN x_content_status_change xcsc on xm.id = xcsc.content_id and xcsc.content_class = 'media' " + | ||
34 | "where xm.`status` = '000' and xm.file_status = '001' and xm.create_time >= ? and xcsc.id is null " + | ||
35 | ") as a ) ", DateUtil.now()); | ||
32 | dbUtil.doExecute(connection, sql, today); | 36 | dbUtil.doExecute(connection, sql, today); |
33 | // 提交事务 | 37 | // 提交事务 |
34 | dbUtil.commitTransaction(connection); | 38 | dbUtil.commitTransaction(connection); | ... | ... |
-
Please register or sign in to post a comment