From cf758fd0d57fda2cf292630f3e50c401244c365b Mon Sep 17 00:00:00 2001 From: liyj <1617420630@qq.com> Date: Mon, 21 Jul 2025 18:13:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=95=86=E5=93=81=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E6=97=B6=E5=A2=9E=E5=8A=A0=E5=BA=97=E9=93=BAid?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop/base/service/ShopBaseProductCategoryService.java | 2 +- .../service/impl/ShopBaseProductCategoryServiceImpl.java | 3 ++- .../shop/sync/service/impl/SyncBaseThirdSxAbstract.java | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/base/service/ShopBaseProductCategoryService.java b/mall-shop/src/main/java/com/suisung/mall/shop/base/service/ShopBaseProductCategoryService.java index 8c0bab77..fbcc6997 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/base/service/ShopBaseProductCategoryService.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/base/service/ShopBaseProductCategoryService.java @@ -115,7 +115,7 @@ public interface ShopBaseProductCategoryService extends IBaseService queryWrapper = new QueryWrapper<>(); queryWrapper.eq("category_name", categoryName); + queryWrapper.eq("store_id", storeId); queryWrapper.orderByAsc("category_parent_id").orderByAsc("category_order"); List list = list(queryWrapper); if (CollUtil.isNotEmpty(list)) { diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/sync/service/impl/SyncBaseThirdSxAbstract.java b/mall-shop/src/main/java/com/suisung/mall/shop/sync/service/impl/SyncBaseThirdSxAbstract.java index 322d713c..a7f8f28b 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/sync/service/impl/SyncBaseThirdSxAbstract.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/sync/service/impl/SyncBaseThirdSxAbstract.java @@ -185,7 +185,7 @@ public abstract class SyncBaseThirdSxAbstract{ firstCategoryName=firstCategoryName.replace(forbidCategoryName,""); } // TODO storeId 不判断一下吗? - ShopBaseProductCategory cate = productCategoryService.getCategoryByName(firstCategoryName); + ShopBaseProductCategory cate = productCategoryService.getCategoryByName(firstCategoryName,storeId); if (cate != null) { list.get(i).setCategory_parent_id(cate.getCategory_id()); } else{ @@ -217,7 +217,7 @@ public abstract class SyncBaseThirdSxAbstract{ secondCategoryName=secondCategoryName.replace(forbidCategoryName,""); } // TODO storeId 不判断一下吗? - ShopBaseProductCategory cate = productCategoryService.getCategoryByName(secondCategoryName); + ShopBaseProductCategory cate = productCategoryService.getCategoryByName(secondCategoryName,storeId); if (cate != null) { list.get(i).setCategory_parent_id(cate.getCategory_id()); } else { @@ -282,7 +282,7 @@ public abstract class SyncBaseThirdSxAbstract{ JSONObject o = (JSONObject) brandListJSON.get(i); if (o != null && StrUtil.isNotBlank(o.getStr("category"))) { // category 一般是父分类名 - ShopBaseProductCategory cate = productCategoryService.getCategoryByName(o.getStr("category")); + ShopBaseProductCategory cate = productCategoryService.getCategoryByName(o.getStr("category"),storeId); if (cate != null) { goodBrandList.get(i).setCategory_id(cate.getCategory_id()); } else {