mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-11-30 22:20:45 +00:00
feat: 批量修改
This commit is contained in:
parent
12aafe8a94
commit
4e7f17091f
@ -77,8 +77,10 @@ class KuaiTuanTuan extends BusinessClient
|
||||
public function batchIncrQuantity($businessGoodsSkus, $num, $incremental)
|
||||
{
|
||||
$batchAppendParams = [];
|
||||
$logData = [];
|
||||
foreach ($businessGoodsSkus as $businessGoodsSku) {
|
||||
[$type, $appendParams] = Goods::incrQuantity($businessGoodsSku['goods_id'], $businessGoodsSku['sku_id'], $num, $incremental ? 1 : 2);
|
||||
$logData[] = $appendParams;
|
||||
$appendParams['type'] = $type;
|
||||
$appendParams['client_id'] = $this->clientId;
|
||||
$appendParams['timestamp'] = time();
|
||||
@ -87,7 +89,9 @@ class KuaiTuanTuan extends BusinessClient
|
||||
$batchAppendParams[] = $appendParams;
|
||||
}
|
||||
$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