From a01d66a318015a9a4f0a18a3bb35649dff3633d8 Mon Sep 17 00:00:00 2001 From: zhuyang <1qazxsw2> Date: Thu, 7 Oct 2021 23:14:30 +0800 Subject: [PATCH] =?UTF-8?q?ProductAttr=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManagementWebApplication.java | 2 +- .../product/ProductAttrController.http | 18 ++- .../product/ProductAttrKeyManager.java | 27 ++-- .../rpc/attr/ProductAttrFeign.java | 94 +++++++++++++ .../rpc/attr/ProductAttrRpc.java | 84 ------------ .../controller/ProductAttrController.java | 128 ++++++++++++++++++ .../rpc/attr/ProductAttrRpcImpl.java | 70 ---------- .../PromotionServiceApplication.java | 2 +- .../SearchServiceApplication.java | 2 +- .../mall/shopweb/ShopWebApplication.java | 2 +- 10 files changed, 255 insertions(+), 174 deletions(-) create mode 100644 product-service-project/product-service-api/src/main/java/cn/iocoder/mall/productservice/rpc/attr/ProductAttrFeign.java delete mode 100644 product-service-project/product-service-api/src/main/java/cn/iocoder/mall/productservice/rpc/attr/ProductAttrRpc.java create mode 100644 product-service-project/product-service-app/src/main/java/cn/iocoder/mall/productservice/controller/ProductAttrController.java delete mode 100644 product-service-project/product-service-app/src/main/java/cn/iocoder/mall/productservice/rpc/attr/ProductAttrRpcImpl.java diff --git a/management-web-app/src/main/java/cn/iocoder/mall/managementweb/ManagementWebApplication.java b/management-web-app/src/main/java/cn/iocoder/mall/managementweb/ManagementWebApplication.java index 0c15ca0e9..07f8d0139 100644 --- a/management-web-app/src/main/java/cn/iocoder/mall/managementweb/ManagementWebApplication.java +++ b/management-web-app/src/main/java/cn/iocoder/mall/managementweb/ManagementWebApplication.java @@ -7,7 +7,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient -@EnableFeignClients(basePackages = {"cn.iocoder.mall.productservice.rpc.spu"}) +@EnableFeignClients(basePackages = {"cn.iocoder.mall.productservice.rpc"}) public class ManagementWebApplication { public static void main(String[] args) { diff --git a/management-web-app/src/main/java/cn/iocoder/mall/managementweb/controller/product/ProductAttrController.http b/management-web-app/src/main/java/cn/iocoder/mall/managementweb/controller/product/ProductAttrController.http index c86c14a08..e946ab23d 100644 --- a/management-web-app/src/main/java/cn/iocoder/mall/managementweb/controller/product/ProductAttrController.http +++ b/management-web-app/src/main/java/cn/iocoder/mall/managementweb/controller/product/ProductAttrController.http @@ -1,7 +1,21 @@ ### /product-attr/page 成功(全部) -GET {{baseUrl}}/product-attr/key/page?pageNo=1&pageSize=10 +GET http://127.0.0.1:18083/management-api/product-attr/key/page?pageNo=1&pageSize=10 Content-Type: application/x-www-form-urlencoded -Authorization: Bearer {{accessToken}} +Authorization: Bearer yudaoyuanma ### +POST http://127.0.0.1:18083/management-api/product-attr/key/create +Content-Type: application/x-www-form-urlencoded +Authorization: Bearer yudaoyuanma + +name=桶&status=1 + +### +POST http://127.0.0.1:18083/management-api/product-attr/value/create +Content-Type: application/x-www-form-urlencoded +Authorization: Bearer yudaoyuanma + +attrKeyId=12&name=大桶&status=1 + +### \ No newline at end of file diff --git a/management-web-app/src/main/java/cn/iocoder/mall/managementweb/manager/product/ProductAttrKeyManager.java b/management-web-app/src/main/java/cn/iocoder/mall/managementweb/manager/product/ProductAttrKeyManager.java index cfa5ec083..26590ba83 100644 --- a/management-web-app/src/main/java/cn/iocoder/mall/managementweb/manager/product/ProductAttrKeyManager.java +++ b/management-web-app/src/main/java/cn/iocoder/mall/managementweb/manager/product/ProductAttrKeyManager.java @@ -4,10 +4,10 @@ import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.common.framework.vo.PageResult; import cn.iocoder.mall.managementweb.controller.product.vo.attr.*; import cn.iocoder.mall.managementweb.convert.product.ProductAttrConvert; -import cn.iocoder.mall.productservice.rpc.attr.ProductAttrRpc; +import cn.iocoder.mall.productservice.rpc.attr.ProductAttrFeign; import cn.iocoder.mall.productservice.rpc.attr.dto.ProductAttrKeyRespDTO; import cn.iocoder.mall.productservice.rpc.attr.dto.ProductAttrValueRespDTO; -import org.apache.dubbo.config.annotation.DubboReference; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @@ -18,9 +18,8 @@ import java.util.List; @Service public class ProductAttrKeyManager { - @DubboReference(version = "${dubbo.consumer.ProductAttrRpc.version}") - private ProductAttrRpc productAttrKeyRpc; - + @Autowired + private ProductAttrFeign productAttrFeign; /** * 创建商品规格键 * @@ -28,7 +27,7 @@ public class ProductAttrKeyManager { * @return 商品规格键 */ public Integer createProductAttrKey(ProductAttrKeyCreateReqVO createVO) { - CommonResult createProductAttrKeyResult = productAttrKeyRpc.createProductAttrKey( + CommonResult createProductAttrKeyResult = productAttrFeign.createProductAttrKey( ProductAttrConvert.INSTANCE.convert(createVO)); createProductAttrKeyResult.checkError(); return createProductAttrKeyResult.getData(); @@ -40,7 +39,7 @@ public class ProductAttrKeyManager { * @param updateVO 更新商品规格键 VO */ public void updateProductAttrKey(ProductAttrKeyUpdateReqVO updateVO) { - CommonResult updateProductAttrKeyResult = productAttrKeyRpc.updateProductAttrKey( + CommonResult updateProductAttrKeyResult = productAttrFeign.updateProductAttrKey( ProductAttrConvert.INSTANCE.convert(updateVO)); updateProductAttrKeyResult.checkError(); } @@ -52,7 +51,7 @@ public class ProductAttrKeyManager { * @return 商品规格键 */ public ProductAttrKeyRespVO getProductAttrKey(Integer productAttrKeyId) { - CommonResult getProductAttrKeyResult = productAttrKeyRpc.getProductAttrKey(productAttrKeyId); + CommonResult getProductAttrKeyResult = productAttrFeign.getProductAttrKey(productAttrKeyId); getProductAttrKeyResult.checkError(); return ProductAttrConvert.INSTANCE.convert(getProductAttrKeyResult.getData()); } @@ -64,7 +63,7 @@ public class ProductAttrKeyManager { * @return 商品规格键列表 */ public List listProductAttrKeys(List productAttrKeyIds) { - CommonResult> listProductAttrKeyResult = productAttrKeyRpc.listProductAttrKeys(productAttrKeyIds); + CommonResult> listProductAttrKeyResult = productAttrFeign.listProductAttrKeys(productAttrKeyIds); listProductAttrKeyResult.checkError(); return ProductAttrConvert.INSTANCE.convertList(listProductAttrKeyResult.getData()); } @@ -76,7 +75,7 @@ public class ProductAttrKeyManager { * @return 商品规格键分页结果 */ public PageResult pageProductAttrKey(ProductAttrKeyPageReqVO pageVO) { - CommonResult> pageProductAttrKeyResult = productAttrKeyRpc.pageProductAttrKey( + CommonResult> pageProductAttrKeyResult = productAttrFeign.pageProductAttrKey( ProductAttrConvert.INSTANCE.convert(pageVO)); pageProductAttrKeyResult.checkError(); return ProductAttrConvert.INSTANCE.convertPage(pageProductAttrKeyResult.getData()); @@ -89,7 +88,7 @@ public class ProductAttrKeyManager { * @return 商品规格值 */ public Integer createProductAttrValue(ProductAttrValueCreateReqVO createVO) { - CommonResult createProductAttrValueResult = productAttrKeyRpc.createProductAttrValue( + CommonResult createProductAttrValueResult = productAttrFeign.createProductAttrValue( ProductAttrConvert.INSTANCE.convert(createVO)); createProductAttrValueResult.checkError(); return createProductAttrValueResult.getData(); @@ -101,7 +100,7 @@ public class ProductAttrKeyManager { * @param updateVO 更新商品规格值 VO */ public void updateProductAttrValue(ProductAttrValueUpdateReqVO updateVO) { - CommonResult updateProductAttrValueResult = productAttrKeyRpc.updateProductAttrValue( + CommonResult updateProductAttrValueResult = productAttrFeign.updateProductAttrValue( ProductAttrConvert.INSTANCE.convert(updateVO)); updateProductAttrValueResult.checkError(); } @@ -113,7 +112,7 @@ public class ProductAttrKeyManager { * @return 商品规格值 */ public ProductAttrValueRespVO getProductAttrValue(Integer productAttrValueId) { - CommonResult getProductAttrValueResult = productAttrKeyRpc.getProductAttrValue(productAttrValueId); + CommonResult getProductAttrValueResult = productAttrFeign.getProductAttrValue(productAttrValueId); getProductAttrValueResult.checkError(); return ProductAttrConvert.INSTANCE.convert(getProductAttrValueResult.getData()); } @@ -125,7 +124,7 @@ public class ProductAttrKeyManager { * @return 商品规格值列表 */ public List listProductAttrValues(ProductAttrValueListQueryReqVO queryReqVO) { - CommonResult> listProductAttrValueResult = productAttrKeyRpc.listProductAttrValues( + CommonResult> listProductAttrValueResult = productAttrFeign.listProductAttrValues( ProductAttrConvert.INSTANCE.convert(queryReqVO)); listProductAttrValueResult.checkError(); return ProductAttrConvert.INSTANCE.convertList02(listProductAttrValueResult.getData()); diff --git a/product-service-project/product-service-api/src/main/java/cn/iocoder/mall/productservice/rpc/attr/ProductAttrFeign.java b/product-service-project/product-service-api/src/main/java/cn/iocoder/mall/productservice/rpc/attr/ProductAttrFeign.java new file mode 100644 index 000000000..0360aa6e3 --- /dev/null +++ b/product-service-project/product-service-api/src/main/java/cn/iocoder/mall/productservice/rpc/attr/ProductAttrFeign.java @@ -0,0 +1,94 @@ +package cn.iocoder.mall.productservice.rpc.attr; + +import cn.iocoder.common.framework.vo.CommonResult; +import cn.iocoder.common.framework.vo.PageResult; +import cn.iocoder.mall.productservice.rpc.attr.dto.*; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; + +/** + * 商品规格 Rpc 接口 + */ +@FeignClient(value = "product-service") +public interface ProductAttrFeign { + + /** + * 创建商品规格键 + * + * @param createDTO 创建商品规格键 DTO + * @return 商品规格键编号 + */ + @PostMapping(value = "/product/attr/createProductAttrKey") + CommonResult createProductAttrKey(@RequestBody ProductAttrKeyCreateReqDTO createDTO); + + /** + * 更新商品规格键 + * + * @param updateDTO 更新商品规格键 DTO + */ + @PostMapping(value = "/product/attr/updateProductAttrKey") + CommonResult updateProductAttrKey(@RequestBody ProductAttrKeyUpdateReqDTO updateDTO); + + /** + * 获得商品规格键 + * + * @param productAttrKeyId 商品规格键编号 + * @return 商品规格键 + */ + @GetMapping("/product/attr/getProductAttrKey") + CommonResult getProductAttrKey(@RequestParam("productAttrKeyId") Integer productAttrKeyId); + + /** + * 获得商品规格键列表 + * + * @param productAttrKeyIds 商品规格键编号列表 + * @return 商品规格键列表 + */ + @GetMapping("/product/attr/listProductAttrKeys") + CommonResult> listProductAttrKeys(@RequestParam("productAttrKeyIds") List productAttrKeyIds); + + /** + * 获得商品规格键分页 + * + * @param pageDTO 商品规格键分页查询 + * @return 商品规格键分页结果 + */ + @PostMapping("/product/attr/pageProductAttrKey") + CommonResult> pageProductAttrKey(@RequestBody ProductAttrKeyPageReqDTO pageDTO); + + /** + * 创建商品规格值 + * + * @param createDTO 创建商品规格值 DTO + * @return 商品规格值编号 + */ + @PostMapping("/product/attr/createProductAttrValue") + CommonResult createProductAttrValue(@RequestBody ProductAttrValueCreateReqDTO createDTO); + + + /** + * 更新商品规格值 + * + * @param updateDTO 更新商品规格值 DTO + */ + @PostMapping("/product/attr/updateProductAttrValue") + CommonResult updateProductAttrValue(@RequestBody ProductAttrValueUpdateReqDTO updateDTO); + + /** + * 获得商品规格值 + * + * @param productAttrValueId 商品规格值编号 + * @return 商品规格值 + */ + @GetMapping("/product/attr/getProductAttrValue") + CommonResult getProductAttrValue(@RequestParam("productAttrValueId") Integer productAttrValueId); + + @PostMapping("/product/attr/listProductAttrValues") + CommonResult> listProductAttrValues(@RequestBody ProductAttrValueListQueryReqDTO queryDTO); + +} \ No newline at end of file diff --git a/product-service-project/product-service-api/src/main/java/cn/iocoder/mall/productservice/rpc/attr/ProductAttrRpc.java b/product-service-project/product-service-api/src/main/java/cn/iocoder/mall/productservice/rpc/attr/ProductAttrRpc.java deleted file mode 100644 index b36697489..000000000 --- a/product-service-project/product-service-api/src/main/java/cn/iocoder/mall/productservice/rpc/attr/ProductAttrRpc.java +++ /dev/null @@ -1,84 +0,0 @@ -package cn.iocoder.mall.productservice.rpc.attr; - -import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.productservice.rpc.attr.dto.*; - -import java.util.List; - -/** - * 商品规格 Rpc 接口 - */ -public interface ProductAttrRpc { - - /** - * 创建商品规格键 - * - * @param createDTO 创建商品规格键 DTO - * @return 商品规格键编号 - */ - CommonResult createProductAttrKey(ProductAttrKeyCreateReqDTO createDTO); - - /** - * 更新商品规格键 - * - * @param updateDTO 更新商品规格键 DTO - */ - CommonResult updateProductAttrKey(ProductAttrKeyUpdateReqDTO updateDTO); - - /** - * 获得商品规格键 - * - * @param productAttrKeyId 商品规格键编号 - * @return 商品规格键 - */ - CommonResult getProductAttrKey(Integer productAttrKeyId); - - /** - * 获得商品规格键列表 - * - * @param productAttrKeyIds 商品规格键编号列表 - * @return 商品规格键列表 - */ - CommonResult> listProductAttrKeys(List productAttrKeyIds); - - /** - * 获得商品规格键分页 - * - * @param pageDTO 商品规格键分页查询 - * @return 商品规格键分页结果 - */ - CommonResult> pageProductAttrKey(ProductAttrKeyPageReqDTO pageDTO); - - /** - * 创建商品规格值 - * - * @param createDTO 创建商品规格值 DTO - * @return 商品规格值编号 - */ - CommonResult createProductAttrValue(ProductAttrValueCreateReqDTO createDTO); - - /** - * 更新商品规格值 - * - * @param updateDTO 更新商品规格值 DTO - */ - CommonResult updateProductAttrValue(ProductAttrValueUpdateReqDTO updateDTO); - - /** - * 获得商品规格值 - * - * @param productAttrValueId 商品规格值编号 - * @return 商品规格值 - */ - CommonResult getProductAttrValue(Integer productAttrValueId); - - /** - * 获得商品规格值列表 - * - * @param queryDTO 商品规格值的列表查询条件 DTO - * @return 商品规格值列表 - */ - CommonResult> listProductAttrValues(ProductAttrValueListQueryReqDTO queryDTO); - -} diff --git a/product-service-project/product-service-app/src/main/java/cn/iocoder/mall/productservice/controller/ProductAttrController.java b/product-service-project/product-service-app/src/main/java/cn/iocoder/mall/productservice/controller/ProductAttrController.java new file mode 100644 index 000000000..26904d4e7 --- /dev/null +++ b/product-service-project/product-service-app/src/main/java/cn/iocoder/mall/productservice/controller/ProductAttrController.java @@ -0,0 +1,128 @@ +package cn.iocoder.mall.productservice.controller; + +import cn.iocoder.common.framework.vo.CommonResult; +import cn.iocoder.common.framework.vo.PageResult; +import cn.iocoder.mall.productservice.manager.attr.ProductAttrManager; +import cn.iocoder.mall.productservice.rpc.attr.dto.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +import static cn.iocoder.common.framework.vo.CommonResult.success; + +@RestController +@RequestMapping("/product/attr") +@Api("商品属性") +public class ProductAttrController { + @Autowired + private ProductAttrManager productAttrManager; + + @PostMapping("/createProductAttrKey") + @ApiOperation("创建商品规格键") + CommonResult createProductAttrKey(@RequestBody ProductAttrKeyCreateReqDTO createDTO){ + return success(productAttrManager.createProductAttrKey(createDTO)); + } + + /** + * 更新商品规格键 + * + * @param updateDTO 更新商品规格键 DTO + */ + @PostMapping("/updateProductAttrKey") + @ApiOperation("更新商品规格键") + CommonResult updateProductAttrKey(@RequestBody ProductAttrKeyUpdateReqDTO updateDTO){ + productAttrManager.updateProductAttrKey(updateDTO); + return success(true); + } + + /** + * 获得商品规格键 + * + * @param productAttrKeyId 商品规格键编号 + * @return 商品规格键 + */ + @GetMapping("/getProductAttrKey") + @ApiOperation("获得商品规格键") + CommonResult getProductAttrKey(@RequestParam("productAttrKeyId") Integer productAttrKeyId){ + return success(productAttrManager.getProductAttrKey(productAttrKeyId)); + } + + + /** + * 获得商品规格键列表 + * + * @param productAttrKeyIds 商品规格键编号列表 + * @return 商品规格键列表 + */ + @GetMapping("/listProductAttrKeys") + @ApiOperation("获得商品规格键列表") + CommonResult> listProductAttrKeys(@RequestParam("productAttrKeyIds") List productAttrKeyIds){ + return success(productAttrManager.listProductAttrKeys(productAttrKeyIds)); + } + + /** + * 获得商品规格键分页 + * + * @param pageDTO 商品规格键分页查询 + * @return 商品规格键分页结果 + */ + @PostMapping("/pageProductAttrKey") + @ApiOperation("获得商品规格键分页") + CommonResult> pageProductAttrKey(@RequestBody ProductAttrKeyPageReqDTO pageDTO){ + return success(productAttrManager.pageProductAttrKey(pageDTO)); + } + + /** + * 创建商品规格值 + * + * @param createDTO 创建商品规格值 DTO + * @return 商品规格值编号 + */ + @PostMapping("/createProductAttrValue") + @ApiOperation("创建商品规格值") + CommonResult createProductAttrValue(@RequestBody ProductAttrValueCreateReqDTO createDTO){ + return success(productAttrManager.createProductAttrValue(createDTO)); + } + + + + /** + * 更新商品规格值 + * + * @param updateDTO 更新商品规格值 DTO + */ + @PostMapping("/updateProductAttrValue") + @ApiOperation("更新商品规格值") + CommonResult updateProductAttrValue(@RequestBody ProductAttrValueUpdateReqDTO updateDTO){ + productAttrManager.updateProductAttrValue(updateDTO); + return success(true); + } + + /** + * 获得商品规格值 + * + * @param productAttrValueId 商品规格值编号 + * @return 商品规格值 + */ + @GetMapping("/getProductAttrValue") + @ApiOperation("获得商品规格值") + CommonResult getProductAttrValue(@RequestParam("productAttrValueId") Integer productAttrValueId){ + return success(productAttrManager.getProductAttrValue(productAttrValueId)); + } + + /** + * 获得商品规格值列表 + * + * @param queryDTO 商品规格值的列表查询条件 DTO + * @return 商品规格值列表 + */ + @PostMapping("/listProductAttrValues") + @ApiOperation("获得商品规格值列表") + CommonResult> listProductAttrValues(@RequestBody ProductAttrValueListQueryReqDTO queryDTO){ + return success(productAttrManager.listProductAttrValues(queryDTO)); + } + +} diff --git a/product-service-project/product-service-app/src/main/java/cn/iocoder/mall/productservice/rpc/attr/ProductAttrRpcImpl.java b/product-service-project/product-service-app/src/main/java/cn/iocoder/mall/productservice/rpc/attr/ProductAttrRpcImpl.java deleted file mode 100644 index 889e261de..000000000 --- a/product-service-project/product-service-app/src/main/java/cn/iocoder/mall/productservice/rpc/attr/ProductAttrRpcImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -package cn.iocoder.mall.productservice.rpc.attr; - -import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.productservice.manager.attr.ProductAttrManager; -import cn.iocoder.mall.productservice.rpc.attr.dto.*; -import org.apache.dubbo.config.annotation.DubboService; -import org.springframework.beans.factory.annotation.Autowired; - -import java.util.List; - -import static cn.iocoder.common.framework.vo.CommonResult.success; - -/** - * 商品规格 Rpc 实现类 - */ -@DubboService -public class ProductAttrRpcImpl implements ProductAttrRpc { - - @Autowired - private ProductAttrManager productAttrManager; - - @Override - public CommonResult createProductAttrKey(ProductAttrKeyCreateReqDTO createDTO) { - return success(productAttrManager.createProductAttrKey(createDTO)); - } - - @Override - public CommonResult updateProductAttrKey(ProductAttrKeyUpdateReqDTO updateDTO) { - productAttrManager.updateProductAttrKey(updateDTO); - return success(true); - } - - @Override - public CommonResult getProductAttrKey(Integer productAttrKeyId) { - return success(productAttrManager.getProductAttrKey(productAttrKeyId)); - } - - @Override - public CommonResult> listProductAttrKeys(List productAttrKeyIds) { - return success(productAttrManager.listProductAttrKeys(productAttrKeyIds)); - } - - @Override - public CommonResult> pageProductAttrKey(ProductAttrKeyPageReqDTO pageDTO) { - return success(productAttrManager.pageProductAttrKey(pageDTO)); - } - - @Override - public CommonResult createProductAttrValue(ProductAttrValueCreateReqDTO createDTO) { - return success(productAttrManager.createProductAttrValue(createDTO)); - } - - @Override - public CommonResult updateProductAttrValue(ProductAttrValueUpdateReqDTO updateDTO) { - productAttrManager.updateProductAttrValue(updateDTO); - return success(true); - } - - @Override - public CommonResult getProductAttrValue(Integer productAttrValueId) { - return success(productAttrManager.getProductAttrValue(productAttrValueId)); - } - - @Override - public CommonResult> listProductAttrValues(ProductAttrValueListQueryReqDTO queryDTO) { - return success(productAttrManager.listProductAttrValues(queryDTO)); - } - -} diff --git a/promotion-service-project/promotion-service-app/src/main/java/cn/iocoder/mall/promotionservice/PromotionServiceApplication.java b/promotion-service-project/promotion-service-app/src/main/java/cn/iocoder/mall/promotionservice/PromotionServiceApplication.java index 06143b6c9..0a460a932 100644 --- a/promotion-service-project/promotion-service-app/src/main/java/cn/iocoder/mall/promotionservice/PromotionServiceApplication.java +++ b/promotion-service-project/promotion-service-app/src/main/java/cn/iocoder/mall/promotionservice/PromotionServiceApplication.java @@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient -@EnableFeignClients(basePackages = {"cn.iocoder.mall.productservice.rpc.spu"}) +@EnableFeignClients(basePackages = {"cn.iocoder.mall.productservice.rpc"}) public class PromotionServiceApplication { public static void main(String[] args) { diff --git a/search-service-project/search-service-app/src/main/java/cn/iocoder/mall/searchservice/SearchServiceApplication.java b/search-service-project/search-service-app/src/main/java/cn/iocoder/mall/searchservice/SearchServiceApplication.java index a0a162ac1..fb9a89867 100644 --- a/search-service-project/search-service-app/src/main/java/cn/iocoder/mall/searchservice/SearchServiceApplication.java +++ b/search-service-project/search-service-app/src/main/java/cn/iocoder/mall/searchservice/SearchServiceApplication.java @@ -7,7 +7,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient -@EnableFeignClients(basePackages = {"cn.iocoder.mall.productservice.rpc.spu"}) +@EnableFeignClients(basePackages = {"cn.iocoder.mall.productservice.rpc"}) public class SearchServiceApplication { public static void main(String[] args) { diff --git a/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/ShopWebApplication.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/ShopWebApplication.java index ca0a38146..ec1fbd429 100644 --- a/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/ShopWebApplication.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/ShopWebApplication.java @@ -7,7 +7,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient -@EnableFeignClients(basePackages = {"cn.iocoder.mall.productservice.rpc.spu"}) +@EnableFeignClients(basePackages = {"cn.iocoder.mall.productservice.rpc"}) public class ShopWebApplication { public static void main(String[] args) {