Commit f90507b7 by 杨树贤

修复数据

parent 3f2dce8a
......@@ -51,6 +51,28 @@ class LogService
return $model->insert($data);
}
public function BatchAddIgnoreAuditLogs($supplierIds,$type,$action,$content,$remark = '')
{
$adminId = request()->user->userId;
$adminName = request()->user->name;
$data = [];
foreach ($supplierIds as $supplierId) {
$data[] = [
'supplier_id' => $supplierId,
'type' => $type,
'action' => $action,
'content' => $content,
'remark' => $remark,
'admin_id' => $adminId,
'admin_name' => $adminName,
'ignore_audit_check' => 1,
'add_time' => time(),
];
}
$model = new LogModel();
return $model->insert($data);
}
//添加忽略审核的日志
public function AddIgnoreAuditCheckLog($supplierId, $type, $action, $content, $remark = '')
{
......
......@@ -383,7 +383,7 @@ class SkuService
}
$cpTimeDay = $cpTimeDay == -1 ? '无限制' : $cpTimeDay;
(new LogService())->BatchAddLogs($supplierIdList, LogModel::UPDATE_OPERATE, '批量配置供应商sku上架有效期', '上架有效期修改为' . $cpTimeDay . '天');
(new LogService())->BatchAddIgnoreAuditLogs($supplierIdList, LogModel::UPDATE_OPERATE, '批量配置供应商sku上架有效期', '上架有效期修改为' . $cpTimeDay . '天');
}
}
......@@ -407,7 +407,7 @@ class SkuService
$ruler['upload_validity_period'] = $cpTimeDay;
(new SupplierService())->saveSkuCpTimeRulerToRedis($supplierId, $ruler);
$cpTimeDay = $cpTimeDay == -1 ? '无限制' : $cpTimeDay;
(new LogService())->AddLog($supplierId, LogModel::UPDATE_OPERATE, '批量配置供应商sku上架有效期', '上架有效期修由' . $originDays . '改为' . $cpTimeDay . '天');
(new LogService())->AddIgnoreAuditCheckLog($supplierId, LogModel::UPDATE_OPERATE, '批量配置供应商sku上架有效期', '上架有效期修由' . $originDays . '改为' . $cpTimeDay . '天');
}
}
}
......
......@@ -70,9 +70,9 @@ Route::match(['get', 'post'], '/test', function () {
(new \App\Http\Services\DataService())->statisticsSkuNumber();
// (new \App\Http\Services\DataService())->initialMainBrandsLimit();
// (new \App\Http\Services\DataService())->initialMainBrandsToSkuRuler();
\App\Model\SupplierChannelModel::where('supplier_code', 'L0010173')->update([
'stockup_type' => '',
]);
\App\Model\LogModel::where('action','批量配置供应商sku上架有效期')->update([
'ignore_audit_check' => 1
]);
// \App\Model\SupplierChannelModel::where('supplier_name', '厦门市三安集成电路有限公司')->update([
// 'status' => 2,
// 'update_time' => time(),
......
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