Commit 826b7233 826b7233cb8380d512032308a238d410a31cf9c1 by lWoHvYe

自动上线筛选逻辑调整

1 parent 160db00a
......@@ -28,7 +28,11 @@ public class AutoOnlineProcessor {
try {
connection = dbUtil.getConnection();
// 查询未绑定
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);
String sql = StrUtil.format(" update `x_media` set `status` = '001',`update_time` = '{}' " +
"where id in ( select a.id from " +
"(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' " +
"where xm.`status` = '000' and xm.file_status = '001' and xm.create_time >= ? and xcsc.id is null " +
") as a ) ", DateUtil.now());
dbUtil.doExecute(connection, sql, today);
// 提交事务
dbUtil.commitTransaction(connection);
......