修改 system-service-app 导入的数据库脚本
This commit is contained in:
@@ -46,11 +46,20 @@ public interface ProductSpuRpc {
|
||||
CommonResult<List<ProductSpuRespDTO>> listProductSpus(List<Integer> productSpuIds);
|
||||
|
||||
/**
|
||||
* 获得商品 SPU分页
|
||||
* 获得商品 SPU 分页
|
||||
*
|
||||
* @param pageDTO 商品 SPU分页查询
|
||||
* @return 商品 SPU分页结果
|
||||
* @param pageDTO 商品 SPU 分页查询
|
||||
* @return 商品 SPU 分页结果
|
||||
*/
|
||||
CommonResult<PageResult<ProductSpuRespDTO>> pageProductSpu(ProductSpuPageReqDTO pageDTO);
|
||||
|
||||
/**
|
||||
* 顺序获得商品 SPU 编号数组
|
||||
*
|
||||
* @param limit 数量
|
||||
* @param lastSpuId 最后一个商品 SPU 编号
|
||||
* @return 商品 SPU 编号数组
|
||||
*/
|
||||
CommonResult<List<Integer>> listProductSpuIds(Integer limit, Integer lastSpuId);
|
||||
|
||||
}
|
||||
|
||||
@@ -47,6 +47,10 @@ public class ProductSpuManager {
|
||||
@Autowired
|
||||
private ProductMQProducer productMQProducer;
|
||||
|
||||
private static ProductSpuManager self() {
|
||||
return (ProductSpuManager) AopContext.currentProxy();
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建商品 SPU 和 SKU
|
||||
*
|
||||
@@ -158,6 +162,17 @@ public class ProductSpuManager {
|
||||
return categoryBO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 顺序获得商品 SPU 编号数组
|
||||
*
|
||||
* @param limit 数量
|
||||
* @param lastSpuId 最后一个商品 SPU 编号
|
||||
* @return 商品 SPU 编号数组
|
||||
*/
|
||||
public List<Integer> listProductSpuIds(Integer limit, Integer lastSpuId) {
|
||||
return productAttrService.listProductSpuIds(limit, lastSpuId);
|
||||
}
|
||||
|
||||
private List<ProductAttrKeyValueBO> checkProductAttr(List<ProductSkuCreateOrUpdateBO> skuBOs) {
|
||||
// 第一步,校验 SKU 使用到的规格是否存在
|
||||
Set<Integer> attrValueIds = new HashSet<>();
|
||||
@@ -192,8 +207,4 @@ public class ProductSpuManager {
|
||||
return attrKeyValueBOs;
|
||||
}
|
||||
|
||||
private ProductSpuManager self() {
|
||||
return (ProductSpuManager) AopContext.currentProxy();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -49,4 +49,9 @@ public class ProductSpuRpcImpl implements ProductSpuRpc {
|
||||
return success(productSpuManager.pageProductSpu(pageDTO));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<Integer>> listProductSpuIds(Integer limit, Integer lastSpuId) {
|
||||
return success(productSpuManager.listProductSpuIds(limit, lastSpuId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -208,4 +208,18 @@ public class ProductAttrService {
|
||||
return ProductAttrConvert.INSTANCE.convertList03(productAttrValueDOs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 顺序获得商品 SPU 编号数组
|
||||
*
|
||||
* 一般情况下,该接口我们用于提供顺序的 SPU 编号数组,以便调用方进一步根据自己需要获取商品信息
|
||||
* 例如说,搜索服务会不断获取商品编号,重建该商品编号的索引
|
||||
*
|
||||
* @param limit 数量
|
||||
* @param lastSpuId 最后一个商品 SPU 编号
|
||||
* @return 商品 SPU 编号数组
|
||||
*/
|
||||
public List<Integer> listProductSpuIds(Integer limit, Integer lastSpuId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user