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
456943326d
commit
2044dd4d6b
@ -121,7 +121,12 @@ class KuaiTuanTuan extends BusinessClient
|
||||
$publicParams['sign'] = $this->getSign($publicParams);
|
||||
$res = $this->formDataPostRequest($url, $publicParams);
|
||||
if (isset($res['error_response'])) {
|
||||
throw new \RuntimeException($res['error_response']['error_msg']);
|
||||
// ToDo 重构异常处理
|
||||
if ('业务服务错误' === $res['error_response']['error_msg'] && '该店铺下不存在该商品' === $res['error_response']['sub_msg']) {
|
||||
BusinessGoodsSku::where('goods_id', $appendParams['goods_id'])->where('sku_id', $appendParams['sku_id'])->delete();
|
||||
} else {
|
||||
throw new \RuntimeException($res['error_response']['error_msg'] . ':' . $res['error_response']['error_msg']);
|
||||
}
|
||||
}
|
||||
|
||||
return $res;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user