diff --git a/app/Http/Controllers/Shop/ShopsController.php b/app/Http/Controllers/Shop/ShopsController.php index 0f7873b..d8b0e85 100644 --- a/app/Http/Controllers/Shop/ShopsController.php +++ b/app/Http/Controllers/Shop/ShopsController.php @@ -172,8 +172,6 @@ class ShopsController extends Controller public function downloadGoods($id, Request $request) { $shop = Shop::query()->find($id); - // 删除已下载的商品数据 - BusinessGoodsSku::query()->where('shop_id', $shop->id)->delete(); $business = BusinessFactory::init()->make($shop->plat_id); $business->setShop($shop); $business->downloadGoodsListAndBind(); diff --git a/app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php b/app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php index b2a0e57..2cba3d4 100644 --- a/app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php +++ b/app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php @@ -123,7 +123,12 @@ class KuaiTuanTuan extends BusinessClient $publicParams['sign'] = $this->getSign($publicParams); $res = $this->formDataPostRequest($url, $publicParams); if (isset($res['error_response'])) { - Log::info(json_encode($res, 256)); + // "error_msg":"业务服务错误","sub_msg":"该店铺下不存在该商品","sub_code":"11","error_code":50001 + // "error_msg":"业务服务错误","sub_msg":"该SKU在快团团中设置的库存为无限库存,不支持修改库存","sub_code":"13","error_code":50001 + if (50001 == $res['error_response']['error_code'] && in_array($res['error_response']['sub_code'], ['13', '11'])) { + BusinessGoodsSku::query()->where('goods_id', $appendParams['goods_id'])->where('sku_id', $appendParams['sku_id'])->update(['is_sync' => 0]); + } + Log::error(json_encode($res, 256)); } return $res; diff --git a/public/dist/index.html b/public/dist/index.html index beb1705..b6d5b66 100644 --- a/public/dist/index.html +++ b/public/dist/index.html @@ -1 +1 @@ -
{{ scope.row.created_at }}
\n \n{{ scope.row.created_at }}
\n \n