diff --git a/app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php b/app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php index b385410..034f86d 100644 --- a/app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php +++ b/app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php @@ -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;