mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-11-30 22:20:45 +00:00
commit
662acf7018
@ -77,8 +77,10 @@ class KuaiTuanTuan extends BusinessClient
|
|||||||
public function batchIncrQuantity($businessGoodsSkus, $num, $incremental)
|
public function batchIncrQuantity($businessGoodsSkus, $num, $incremental)
|
||||||
{
|
{
|
||||||
$batchAppendParams = [];
|
$batchAppendParams = [];
|
||||||
|
$logData = [];
|
||||||
foreach ($businessGoodsSkus as $businessGoodsSku) {
|
foreach ($businessGoodsSkus as $businessGoodsSku) {
|
||||||
[$type, $appendParams] = Goods::incrQuantity($businessGoodsSku['goods_id'], $businessGoodsSku['sku_id'], $num, $incremental ? 1 : 2);
|
[$type, $appendParams] = Goods::incrQuantity($businessGoodsSku['goods_id'], $businessGoodsSku['sku_id'], $num, $incremental ? 1 : 2);
|
||||||
|
$logData[] = $appendParams;
|
||||||
$appendParams['type'] = $type;
|
$appendParams['type'] = $type;
|
||||||
$appendParams['client_id'] = $this->clientId;
|
$appendParams['client_id'] = $this->clientId;
|
||||||
$appendParams['timestamp'] = time();
|
$appendParams['timestamp'] = time();
|
||||||
@ -87,7 +89,9 @@ class KuaiTuanTuan extends BusinessClient
|
|||||||
$batchAppendParams[] = $appendParams;
|
$batchAppendParams[] = $appendParams;
|
||||||
}
|
}
|
||||||
$this->batchAsyncPostRequest('https://gw-api.pinduoduo.com/api/router', $batchAppendParams);
|
$this->batchAsyncPostRequest('https://gw-api.pinduoduo.com/api/router', $batchAppendParams);
|
||||||
Log::info('本次批量同步: ' . json_encode($appendParams, 256));
|
if ($logData) {
|
||||||
|
Log::info('本次批量同步: ' . json_encode($logData, 256));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user