初始化商品分页接口
This commit is contained in:
@@ -70,19 +70,6 @@ public class ProductSpuServiceImpl implements ProductSpuService {
|
||||
return ProductSpuConvert.INSTANCE.convert2(spu, skus, attrAndValuePairList, category);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductSpuDetailBO> getProductSpuDetailListForSync(Integer lastId, Integer limit) {
|
||||
// TODO 芋艿,这里目前是一个一个进行计算,后续需要优化下
|
||||
// 查询下一批商品编号集合
|
||||
List<Integer> spuIds = productSpuMapper.selectIdListByIdGt(lastId, limit);
|
||||
if (spuIds.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
// 查询每个商品明细
|
||||
List<ProductSpuDetailBO> spus = spuIds.stream().map(id -> getProductSpuDetail(id)).collect(Collectors.toList()); // TODO 芋艿,此处相当于是 N 个查询,后续要优化。
|
||||
return spus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateProductSpuSort(Integer adminId, Integer spuId, Integer sort) {
|
||||
// 校验 Spu 是否存在
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package cn.iocoder.mall.product.application.vo.users;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel("商品 SPU 分页 VO")
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class UsersProductSpuPageVO {
|
||||
|
||||
@ApiModelProperty(value = "spu 数组", required = true)
|
||||
private List<UsersProductSpuVO> spus;
|
||||
@ApiModelProperty(value = "总数", required = true)
|
||||
private Integer count;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user