Commit 160db00a 160db00a330fc54681ccaf91cac40b55cf8c2192 by lWoHvYe

内容上下线不变更更新时间的问题

1 parent 6e04f592
......@@ -10,6 +10,7 @@ import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.sql.Connection;
import java.util.Date;
@Component
@Slf4j
......@@ -27,7 +28,7 @@ public class AutoOnlineProcessor {
try {
connection = dbUtil.getConnection();
// 查询未绑定
String sql = StrUtil.format(" update `x_media` set `status` = '001' where `status` = '000' and file_status = '001' and (update_time - create_time) < {} and create_time >= ? ", DIFFERENCE);
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);
dbUtil.doExecute(connection, sql, today);
// 提交事务
dbUtil.commitTransaction(connection);
......
......@@ -15,7 +15,7 @@ cron:
# 任务执行间隔
app: 0/10 * * * * ?
service: 0/10 * * * * ?
media-online: 0/10 * * * * ?
media-online: 0/60 * * * * ?
spring:
mail:
......@@ -34,5 +34,5 @@ entity:
appId: 63
# 自动绑的服务包id
serviceId: 1
# 自动上线判断依据:创建更新时间间隔秒
difference: 1800
# 自动上线判断依据:创建更新时间间隔,与执行时间一致
difference: 60
......