Commit a6417373 authored by jianghaiming's avatar jianghaiming

update:set

parent 678d1ce2
<?php
namespace Daemon;
use Api\PhpServices\Daemon\DaemonServiceInterface;
use App\Models\goods\mysql\GoodsSku;
class Goods implements DaemonServiceInterface
{
public function __construct(int $mid)
{
$this->mid = $mid;
}
public function run()
{
sleep(2);
$orderData = [
'online_status' => 1,
'rule_end_time[<]' => date("Y-m-d H:i:s",time())
];
$goodsList = GoodsSku::getRecords($orderData);
foreach ($goodsList as $key => $value) {
$where = [];
$where['goods_sku_id'] = !empty($value['goods_sku_id']) ? $value['goods_sku_id'] : '';
$colums = [
'online_status' => 2,
];
GoodsSku::save($colums, $where);
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment