ProductAttr改造
This commit is contained in:
parent
4f50845b66
commit
a01d66a318
@ -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) {
|
||||
|
@ -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
|
||||
|
||||
###
|
@ -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<Integer> createProductAttrKeyResult = productAttrKeyRpc.createProductAttrKey(
|
||||
CommonResult<Integer> 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<Boolean> updateProductAttrKeyResult = productAttrKeyRpc.updateProductAttrKey(
|
||||
CommonResult<Boolean> updateProductAttrKeyResult = productAttrFeign.updateProductAttrKey(
|
||||
ProductAttrConvert.INSTANCE.convert(updateVO));
|
||||
updateProductAttrKeyResult.checkError();
|
||||
}
|
||||
@ -52,7 +51,7 @@ public class ProductAttrKeyManager {
|
||||
* @return 商品规格键
|
||||
*/
|
||||
public ProductAttrKeyRespVO getProductAttrKey(Integer productAttrKeyId) {
|
||||
CommonResult<ProductAttrKeyRespDTO> getProductAttrKeyResult = productAttrKeyRpc.getProductAttrKey(productAttrKeyId);
|
||||
CommonResult<ProductAttrKeyRespDTO> getProductAttrKeyResult = productAttrFeign.getProductAttrKey(productAttrKeyId);
|
||||
getProductAttrKeyResult.checkError();
|
||||
return ProductAttrConvert.INSTANCE.convert(getProductAttrKeyResult.getData());
|
||||
}
|
||||
@ -64,7 +63,7 @@ public class ProductAttrKeyManager {
|
||||
* @return 商品规格键列表
|
||||
*/
|
||||
public List<ProductAttrKeyRespVO> listProductAttrKeys(List<Integer> productAttrKeyIds) {
|
||||
CommonResult<List<ProductAttrKeyRespDTO>> listProductAttrKeyResult = productAttrKeyRpc.listProductAttrKeys(productAttrKeyIds);
|
||||
CommonResult<List<ProductAttrKeyRespDTO>> listProductAttrKeyResult = productAttrFeign.listProductAttrKeys(productAttrKeyIds);
|
||||
listProductAttrKeyResult.checkError();
|
||||
return ProductAttrConvert.INSTANCE.convertList(listProductAttrKeyResult.getData());
|
||||
}
|
||||
@ -76,7 +75,7 @@ public class ProductAttrKeyManager {
|
||||
* @return 商品规格键分页结果
|
||||
*/
|
||||
public PageResult<ProductAttrKeyRespVO> pageProductAttrKey(ProductAttrKeyPageReqVO pageVO) {
|
||||
CommonResult<PageResult<ProductAttrKeyRespDTO>> pageProductAttrKeyResult = productAttrKeyRpc.pageProductAttrKey(
|
||||
CommonResult<PageResult<ProductAttrKeyRespDTO>> 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<Integer> createProductAttrValueResult = productAttrKeyRpc.createProductAttrValue(
|
||||
CommonResult<Integer> 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<Boolean> updateProductAttrValueResult = productAttrKeyRpc.updateProductAttrValue(
|
||||
CommonResult<Boolean> updateProductAttrValueResult = productAttrFeign.updateProductAttrValue(
|
||||
ProductAttrConvert.INSTANCE.convert(updateVO));
|
||||
updateProductAttrValueResult.checkError();
|
||||
}
|
||||
@ -113,7 +112,7 @@ public class ProductAttrKeyManager {
|
||||
* @return 商品规格值
|
||||
*/
|
||||
public ProductAttrValueRespVO getProductAttrValue(Integer productAttrValueId) {
|
||||
CommonResult<ProductAttrValueRespDTO> getProductAttrValueResult = productAttrKeyRpc.getProductAttrValue(productAttrValueId);
|
||||
CommonResult<ProductAttrValueRespDTO> getProductAttrValueResult = productAttrFeign.getProductAttrValue(productAttrValueId);
|
||||
getProductAttrValueResult.checkError();
|
||||
return ProductAttrConvert.INSTANCE.convert(getProductAttrValueResult.getData());
|
||||
}
|
||||
@ -125,7 +124,7 @@ public class ProductAttrKeyManager {
|
||||
* @return 商品规格值列表
|
||||
*/
|
||||
public List<ProductAttrValueRespVO> listProductAttrValues(ProductAttrValueListQueryReqVO queryReqVO) {
|
||||
CommonResult<List<ProductAttrValueRespDTO>> listProductAttrValueResult = productAttrKeyRpc.listProductAttrValues(
|
||||
CommonResult<List<ProductAttrValueRespDTO>> listProductAttrValueResult = productAttrFeign.listProductAttrValues(
|
||||
ProductAttrConvert.INSTANCE.convert(queryReqVO));
|
||||
listProductAttrValueResult.checkError();
|
||||
return ProductAttrConvert.INSTANCE.convertList02(listProductAttrValueResult.getData());
|
||||
|
@ -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<Integer> createProductAttrKey(@RequestBody ProductAttrKeyCreateReqDTO createDTO);
|
||||
|
||||
/**
|
||||
* 更新商品规格键
|
||||
*
|
||||
* @param updateDTO 更新商品规格键 DTO
|
||||
*/
|
||||
@PostMapping(value = "/product/attr/updateProductAttrKey")
|
||||
CommonResult<Boolean> updateProductAttrKey(@RequestBody ProductAttrKeyUpdateReqDTO updateDTO);
|
||||
|
||||
/**
|
||||
* 获得商品规格键
|
||||
*
|
||||
* @param productAttrKeyId 商品规格键编号
|
||||
* @return 商品规格键
|
||||
*/
|
||||
@GetMapping("/product/attr/getProductAttrKey")
|
||||
CommonResult<ProductAttrKeyRespDTO> getProductAttrKey(@RequestParam("productAttrKeyId") Integer productAttrKeyId);
|
||||
|
||||
/**
|
||||
* 获得商品规格键列表
|
||||
*
|
||||
* @param productAttrKeyIds 商品规格键编号列表
|
||||
* @return 商品规格键列表
|
||||
*/
|
||||
@GetMapping("/product/attr/listProductAttrKeys")
|
||||
CommonResult<List<ProductAttrKeyRespDTO>> listProductAttrKeys(@RequestParam("productAttrKeyIds") List<Integer> productAttrKeyIds);
|
||||
|
||||
/**
|
||||
* 获得商品规格键分页
|
||||
*
|
||||
* @param pageDTO 商品规格键分页查询
|
||||
* @return 商品规格键分页结果
|
||||
*/
|
||||
@PostMapping("/product/attr/pageProductAttrKey")
|
||||
CommonResult<PageResult<ProductAttrKeyRespDTO>> pageProductAttrKey(@RequestBody ProductAttrKeyPageReqDTO pageDTO);
|
||||
|
||||
/**
|
||||
* 创建商品规格值
|
||||
*
|
||||
* @param createDTO 创建商品规格值 DTO
|
||||
* @return 商品规格值编号
|
||||
*/
|
||||
@PostMapping("/product/attr/createProductAttrValue")
|
||||
CommonResult<Integer> createProductAttrValue(@RequestBody ProductAttrValueCreateReqDTO createDTO);
|
||||
|
||||
|
||||
/**
|
||||
* 更新商品规格值
|
||||
*
|
||||
* @param updateDTO 更新商品规格值 DTO
|
||||
*/
|
||||
@PostMapping("/product/attr/updateProductAttrValue")
|
||||
CommonResult<Boolean> updateProductAttrValue(@RequestBody ProductAttrValueUpdateReqDTO updateDTO);
|
||||
|
||||
/**
|
||||
* 获得商品规格值
|
||||
*
|
||||
* @param productAttrValueId 商品规格值编号
|
||||
* @return 商品规格值
|
||||
*/
|
||||
@GetMapping("/product/attr/getProductAttrValue")
|
||||
CommonResult<ProductAttrValueRespDTO> getProductAttrValue(@RequestParam("productAttrValueId") Integer productAttrValueId);
|
||||
|
||||
@PostMapping("/product/attr/listProductAttrValues")
|
||||
CommonResult<List<ProductAttrValueRespDTO>> listProductAttrValues(@RequestBody ProductAttrValueListQueryReqDTO queryDTO);
|
||||
|
||||
}
|
@ -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<Integer> createProductAttrKey(ProductAttrKeyCreateReqDTO createDTO);
|
||||
|
||||
/**
|
||||
* 更新商品规格键
|
||||
*
|
||||
* @param updateDTO 更新商品规格键 DTO
|
||||
*/
|
||||
CommonResult<Boolean> updateProductAttrKey(ProductAttrKeyUpdateReqDTO updateDTO);
|
||||
|
||||
/**
|
||||
* 获得商品规格键
|
||||
*
|
||||
* @param productAttrKeyId 商品规格键编号
|
||||
* @return 商品规格键
|
||||
*/
|
||||
CommonResult<ProductAttrKeyRespDTO> getProductAttrKey(Integer productAttrKeyId);
|
||||
|
||||
/**
|
||||
* 获得商品规格键列表
|
||||
*
|
||||
* @param productAttrKeyIds 商品规格键编号列表
|
||||
* @return 商品规格键列表
|
||||
*/
|
||||
CommonResult<List<ProductAttrKeyRespDTO>> listProductAttrKeys(List<Integer> productAttrKeyIds);
|
||||
|
||||
/**
|
||||
* 获得商品规格键分页
|
||||
*
|
||||
* @param pageDTO 商品规格键分页查询
|
||||
* @return 商品规格键分页结果
|
||||
*/
|
||||
CommonResult<PageResult<ProductAttrKeyRespDTO>> pageProductAttrKey(ProductAttrKeyPageReqDTO pageDTO);
|
||||
|
||||
/**
|
||||
* 创建商品规格值
|
||||
*
|
||||
* @param createDTO 创建商品规格值 DTO
|
||||
* @return 商品规格值编号
|
||||
*/
|
||||
CommonResult<Integer> createProductAttrValue(ProductAttrValueCreateReqDTO createDTO);
|
||||
|
||||
/**
|
||||
* 更新商品规格值
|
||||
*
|
||||
* @param updateDTO 更新商品规格值 DTO
|
||||
*/
|
||||
CommonResult<Boolean> updateProductAttrValue(ProductAttrValueUpdateReqDTO updateDTO);
|
||||
|
||||
/**
|
||||
* 获得商品规格值
|
||||
*
|
||||
* @param productAttrValueId 商品规格值编号
|
||||
* @return 商品规格值
|
||||
*/
|
||||
CommonResult<ProductAttrValueRespDTO> getProductAttrValue(Integer productAttrValueId);
|
||||
|
||||
/**
|
||||
* 获得商品规格值列表
|
||||
*
|
||||
* @param queryDTO 商品规格值的列表查询条件 DTO
|
||||
* @return 商品规格值列表
|
||||
*/
|
||||
CommonResult<List<ProductAttrValueRespDTO>> listProductAttrValues(ProductAttrValueListQueryReqDTO queryDTO);
|
||||
|
||||
}
|
@ -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<Integer> createProductAttrKey(@RequestBody ProductAttrKeyCreateReqDTO createDTO){
|
||||
return success(productAttrManager.createProductAttrKey(createDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新商品规格键
|
||||
*
|
||||
* @param updateDTO 更新商品规格键 DTO
|
||||
*/
|
||||
@PostMapping("/updateProductAttrKey")
|
||||
@ApiOperation("更新商品规格键")
|
||||
CommonResult<Boolean> updateProductAttrKey(@RequestBody ProductAttrKeyUpdateReqDTO updateDTO){
|
||||
productAttrManager.updateProductAttrKey(updateDTO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得商品规格键
|
||||
*
|
||||
* @param productAttrKeyId 商品规格键编号
|
||||
* @return 商品规格键
|
||||
*/
|
||||
@GetMapping("/getProductAttrKey")
|
||||
@ApiOperation("获得商品规格键")
|
||||
CommonResult<ProductAttrKeyRespDTO> getProductAttrKey(@RequestParam("productAttrKeyId") Integer productAttrKeyId){
|
||||
return success(productAttrManager.getProductAttrKey(productAttrKeyId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获得商品规格键列表
|
||||
*
|
||||
* @param productAttrKeyIds 商品规格键编号列表
|
||||
* @return 商品规格键列表
|
||||
*/
|
||||
@GetMapping("/listProductAttrKeys")
|
||||
@ApiOperation("获得商品规格键列表")
|
||||
CommonResult<List<ProductAttrKeyRespDTO>> listProductAttrKeys(@RequestParam("productAttrKeyIds") List<Integer> productAttrKeyIds){
|
||||
return success(productAttrManager.listProductAttrKeys(productAttrKeyIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得商品规格键分页
|
||||
*
|
||||
* @param pageDTO 商品规格键分页查询
|
||||
* @return 商品规格键分页结果
|
||||
*/
|
||||
@PostMapping("/pageProductAttrKey")
|
||||
@ApiOperation("获得商品规格键分页")
|
||||
CommonResult<PageResult<ProductAttrKeyRespDTO>> pageProductAttrKey(@RequestBody ProductAttrKeyPageReqDTO pageDTO){
|
||||
return success(productAttrManager.pageProductAttrKey(pageDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建商品规格值
|
||||
*
|
||||
* @param createDTO 创建商品规格值 DTO
|
||||
* @return 商品规格值编号
|
||||
*/
|
||||
@PostMapping("/createProductAttrValue")
|
||||
@ApiOperation("创建商品规格值")
|
||||
CommonResult<Integer> createProductAttrValue(@RequestBody ProductAttrValueCreateReqDTO createDTO){
|
||||
return success(productAttrManager.createProductAttrValue(createDTO));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 更新商品规格值
|
||||
*
|
||||
* @param updateDTO 更新商品规格值 DTO
|
||||
*/
|
||||
@PostMapping("/updateProductAttrValue")
|
||||
@ApiOperation("更新商品规格值")
|
||||
CommonResult<Boolean> updateProductAttrValue(@RequestBody ProductAttrValueUpdateReqDTO updateDTO){
|
||||
productAttrManager.updateProductAttrValue(updateDTO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得商品规格值
|
||||
*
|
||||
* @param productAttrValueId 商品规格值编号
|
||||
* @return 商品规格值
|
||||
*/
|
||||
@GetMapping("/getProductAttrValue")
|
||||
@ApiOperation("获得商品规格值")
|
||||
CommonResult<ProductAttrValueRespDTO> getProductAttrValue(@RequestParam("productAttrValueId") Integer productAttrValueId){
|
||||
return success(productAttrManager.getProductAttrValue(productAttrValueId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得商品规格值列表
|
||||
*
|
||||
* @param queryDTO 商品规格值的列表查询条件 DTO
|
||||
* @return 商品规格值列表
|
||||
*/
|
||||
@PostMapping("/listProductAttrValues")
|
||||
@ApiOperation("获得商品规格值列表")
|
||||
CommonResult<List<ProductAttrValueRespDTO>> listProductAttrValues(@RequestBody ProductAttrValueListQueryReqDTO queryDTO){
|
||||
return success(productAttrManager.listProductAttrValues(queryDTO));
|
||||
}
|
||||
|
||||
}
|
@ -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<Integer> createProductAttrKey(ProductAttrKeyCreateReqDTO createDTO) {
|
||||
return success(productAttrManager.createProductAttrKey(createDTO));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> updateProductAttrKey(ProductAttrKeyUpdateReqDTO updateDTO) {
|
||||
productAttrManager.updateProductAttrKey(updateDTO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<ProductAttrKeyRespDTO> getProductAttrKey(Integer productAttrKeyId) {
|
||||
return success(productAttrManager.getProductAttrKey(productAttrKeyId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<ProductAttrKeyRespDTO>> listProductAttrKeys(List<Integer> productAttrKeyIds) {
|
||||
return success(productAttrManager.listProductAttrKeys(productAttrKeyIds));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<PageResult<ProductAttrKeyRespDTO>> pageProductAttrKey(ProductAttrKeyPageReqDTO pageDTO) {
|
||||
return success(productAttrManager.pageProductAttrKey(pageDTO));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Integer> createProductAttrValue(ProductAttrValueCreateReqDTO createDTO) {
|
||||
return success(productAttrManager.createProductAttrValue(createDTO));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> updateProductAttrValue(ProductAttrValueUpdateReqDTO updateDTO) {
|
||||
productAttrManager.updateProductAttrValue(updateDTO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<ProductAttrValueRespDTO> getProductAttrValue(Integer productAttrValueId) {
|
||||
return success(productAttrManager.getProductAttrValue(productAttrValueId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<ProductAttrValueRespDTO>> listProductAttrValues(ProductAttrValueListQueryReqDTO queryDTO) {
|
||||
return success(productAttrManager.listProductAttrValues(queryDTO));
|
||||
}
|
||||
|
||||
}
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user