mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-11-30 22:20:45 +00:00
feat: #10000 日志记录优化
This commit is contained in:
parent
f95516e182
commit
fcbf67f2a3
@ -39,8 +39,8 @@ class UpdateBusinessGoodsStock implements ShouldQueue
|
||||
$log->target_type = 'goods_sku';
|
||||
$log->target_id = $event->goodsSku->id ?? 0;
|
||||
$log->target_field = 'stock';
|
||||
$log->user_id = $event->businessOrderItem['shop_id'];
|
||||
$log->message = ($event->businessOrderItem['external_sku_id'] ?: '商品') . '未找到';
|
||||
$log->user_id = 1;
|
||||
$log->message = ($event->businessOrderItem['external_sku_id'] ?? $event->businessOrderItem['id']) . '未找到';
|
||||
$log->save();
|
||||
|
||||
return;
|
||||
|
||||
@ -10,6 +10,7 @@ use App\Models\GoodsSku;
|
||||
use App\Models\Log;
|
||||
use App\Models\Shop;
|
||||
use GuzzleHttp\Client;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
abstract class BusinessClient
|
||||
{
|
||||
@ -144,10 +145,10 @@ abstract class BusinessClient
|
||||
$log = new Log();
|
||||
$log->module = 'plat';
|
||||
$log->action = $method;
|
||||
$log->target_type = $this->getShop()->plat_id;
|
||||
$log->target_id = $this->getSkuId();
|
||||
$log->target_type = $this->getShop()->plat_id . '--' . $this->getShop()->name;
|
||||
$log->target_id = $this->getShop()->id;
|
||||
$log->target_field = $params['type'];
|
||||
$log->user_id = $this->getShop()->id;
|
||||
$log->user_id = Auth::id();
|
||||
if ($size < 64000) {
|
||||
$log->message = json_encode($res, 256);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user