Commit 8cd2d589 by 杨树贤

初始化脚本

parent 36dd61a2
Showing with 11 additions and 2 deletions
......@@ -1564,13 +1564,21 @@ class DataService
public function initSkuRulers()
{
//全部供应商修改默认值
SupplierChannelModel::where('supplier_id', 12270)->update([
// SupplierChannelModel::where('supplier_id', '>', 0)->update([
// SupplierChannelModel::where('supplier_id', 12270)->update([
SupplierChannelModel::where('supplier_id', '>', 0)->update([
'sku_audit_ruler' => json_encode([
'skip' => 1,
'audit_ruler' => ["1" => 1],
])
]);
$redis = Redis::connection('sku');
$supplierIds = SupplierChannelModel::where('supplier_id', '>', 0)->pluck('supplier_id')->toArray();
foreach ($supplierIds as $supplierId) {
$redis->hset('supplier_sku_audit_ruler', $supplierId, json_encode([
'skip' => 1,
'audit_ruler' => ["1" => 1],
]));
}
}
}
\ 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 sign in to comment