|
|
@@ -46,6 +46,18 @@ public class AutoPublishNoticeService extends ServiceController {
|
|
|
updateSQL.setSiteid(row.getString("siteid"));
|
|
|
sqlList.add(updateSQL.getSQL());
|
|
|
}
|
|
|
+
|
|
|
+ //自动下架单品
|
|
|
+ rows = dbConnect.runSqlQuery("SELECT * from sa_fad WHERE isonsale=1 and offsaledate<=CURRENT_TIME");
|
|
|
+ for (Row row : rows) {
|
|
|
+ UpdateSQL updateSQL = SQLFactory.createUpdateSQL(dbConnect, "sa_fad");
|
|
|
+ updateSQL.setValue("isonsale", 0);
|
|
|
+ updateSQL.setValue("onsaleby", "null");
|
|
|
+ updateSQL.setValue("onsaledate", "null");
|
|
|
+ updateSQL.setUniqueid(row.getLong("sa_fadid"));
|
|
|
+ updateSQL.setSiteid(row.getString("siteid"));
|
|
|
+ sqlList.add(updateSQL.getSQL());
|
|
|
+ }
|
|
|
if (sqlList.size() > 0) {
|
|
|
dbConnect.runSqlUpdate(sqlList);
|
|
|
}
|