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
161afade3d
commit
daa25bb3df
@ -72,7 +72,7 @@ abstract class BusinessClient
|
||||
$orderItem->update($item);
|
||||
}
|
||||
// 增量更新库存
|
||||
if ($num) {
|
||||
if ($num && $item['external_sku_id']) {
|
||||
event(new BusinessOrdersUpdate($orderItem, $num));
|
||||
}
|
||||
}
|
||||
@ -141,6 +141,7 @@ abstract class BusinessClient
|
||||
$res = (new Client())->request($method, $url, $headers);
|
||||
$size = $res->getBody()->getSize();
|
||||
$res = json_decode($res->getBody()->getContents(), true);
|
||||
if (!in_array($params['type'], ['pdd.ktt.increment.order.query', 'pdd.ktt.order.list'], true)) {
|
||||
$log = new Log();
|
||||
$log->module = 'plat';
|
||||
$log->action = $method;
|
||||
@ -152,8 +153,9 @@ abstract class BusinessClient
|
||||
$log->message = json_encode($res, 256) . '=====' . json_encode($params, 256);
|
||||
}
|
||||
$log->save();
|
||||
}
|
||||
if (isset($res['error_response'])) {
|
||||
throw new \RuntimeException($res['error_response']['error_msg']);
|
||||
exit();
|
||||
}
|
||||
|
||||
return $res;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user