前端 mobile :商品列表
This commit is contained in:
@@ -28,6 +28,12 @@ public class UsersProductSpuVO {
|
||||
* 目前的计算方式是,以 Sku 最小价格为准
|
||||
*/
|
||||
private Integer price;
|
||||
/**
|
||||
* 库存数量
|
||||
*
|
||||
* 目前的计算方式是,以 Sku 库存累加为准
|
||||
*/
|
||||
private Integer quantity;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
@@ -82,4 +88,13 @@ public class UsersProductSpuVO {
|
||||
this.price = price;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public UsersProductSpuVO setQuantity(Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -202,7 +202,7 @@ public class ProductSpuServiceImpl implements ProductSpuService {
|
||||
public CommonResult<ProductSpuPageBO> getProductSpuPage(ProductSpuPageDTO productSpuPageDTO) {
|
||||
ProductSpuPageBO productSpuPage = new ProductSpuPageBO();
|
||||
// 查询分页数据
|
||||
int offset = productSpuPageDTO.getPageNo() * productSpuPageDTO.getPageSize();
|
||||
int offset = (productSpuPageDTO.getPageNo() - 1) * productSpuPageDTO.getPageSize();
|
||||
productSpuPage.setSpus(ProductSpuConvert.INSTANCE.convert(productSpuMapper.selectListByNameLikeOrderBySortAsc(
|
||||
productSpuPageDTO.getName(), productSpuPageDTO.getCid(), productSpuPageDTO.getVisible(),
|
||||
offset, productSpuPageDTO.getPageSize())));
|
||||
|
||||
Reference in New Issue
Block a user