|
@@ -281,13 +281,13 @@ class Maintain extends Command
|
|
|
// 下架
|
|
// 下架
|
|
|
$ids = [];
|
|
$ids = [];
|
|
|
foreach ($products as $p) {
|
|
foreach ($products as $p) {
|
|
|
- array_push($ids, $p['id']);
|
|
|
|
|
|
|
+ $ids[] = $p['id'];
|
|
|
}
|
|
}
|
|
|
$ret = Storeproduct::where('id', 'in', $ids)->update([
|
|
$ret = Storeproduct::where('id', 'in', $ids)->update([
|
|
|
'is_show' => 0,
|
|
'is_show' => 0,
|
|
|
]);
|
|
]);
|
|
|
// 记录日志
|
|
// 记录日志
|
|
|
- warnlog("auto off-shelves executed: $ret" . json_encode($ids));
|
|
|
|
|
|
|
+ warnlog("auto off-shelves executed: days=$days, ts=$days_ago, ret=$ret, ids=" . json_encode($ids));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|