后端:商品确认下单的信息 api 接口,后续需要结合促销,完善这个接口。
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
package cn.iocoder.mall.product.api;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.product.api.bo.ProductSpuBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductSpuDetailBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductSpuPageBO;
|
||||
import cn.iocoder.mall.product.api.bo.*;
|
||||
import cn.iocoder.mall.product.api.dto.ProductSpuAddDTO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductSpuPageDTO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductSpuUpdateDTO;
|
||||
@@ -13,7 +11,13 @@ import java.util.List;
|
||||
|
||||
public interface ProductSpuService {
|
||||
|
||||
CommonResult<ProductSpuDetailBO> getProductSpu(Integer id);
|
||||
CommonResult<ProductSpuDetailBO> getProductSpuDetail(Integer id);
|
||||
|
||||
CommonResult<ProductSpuPageBO> getProductSpuPage(ProductSpuPageDTO productSpuPageDTO);
|
||||
|
||||
CommonResult<List<ProductSpuBO>> getProductSpuList(Collection<Integer> ids);
|
||||
|
||||
CommonResult<List<ProductSkuDetailBO>> getProductSkuDetailList(Collection<Integer> ids);
|
||||
|
||||
CommonResult<ProductSpuDetailBO> addProductSpu(Integer adminId, ProductSpuAddDTO productSpuAddDTO);
|
||||
|
||||
@@ -21,8 +25,4 @@ public interface ProductSpuService {
|
||||
|
||||
CommonResult<Boolean> updateProductSpuSort(Integer adminId, Integer spuId, Integer sort);
|
||||
|
||||
CommonResult<ProductSpuPageBO> getProductSpuPage(ProductSpuPageDTO productSpuPageDTO);
|
||||
|
||||
CommonResult<List<ProductSpuBO>> getProductSpuList(Collection<Integer> ids);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品 Sku 明细 BO
|
||||
* 商品 Sku 明细 BO(包括 Spu 明细)
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@@ -18,9 +18,9 @@ public class ProductSkuDetailBO implements Serializable {
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 商品编号
|
||||
* SPU 信息
|
||||
*/
|
||||
private Integer spuId;
|
||||
private Spu spu;
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
@@ -38,4 +38,54 @@ public class ProductSkuDetailBO implements Serializable {
|
||||
*/
|
||||
private Integer quantity;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class Spu implements Serializable {
|
||||
|
||||
/**
|
||||
* SPU 编号
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
// ========== 基本信息 =========
|
||||
/**
|
||||
* SPU 名字
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 卖点
|
||||
*/
|
||||
private String sellPoint;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 分类编号
|
||||
*/
|
||||
private Integer cid;
|
||||
/**
|
||||
* 商品主图地址
|
||||
*
|
||||
* 数组,以逗号分隔
|
||||
*
|
||||
* 建议尺寸:800*800像素,你可以拖拽图片调整顺序,最多上传15张
|
||||
*/
|
||||
private List<String> picUrls;
|
||||
|
||||
// ========== 其他信息 =========
|
||||
/**
|
||||
* 是否上架商品(是否可见)。
|
||||
*
|
||||
* true 为已上架
|
||||
* false 为已下架
|
||||
*/
|
||||
private Boolean visible;
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -62,6 +62,40 @@ public class ProductSpuDetailBO implements Serializable {
|
||||
/**
|
||||
* SKU 数组
|
||||
*/
|
||||
private List<ProductSkuDetailBO> skus;
|
||||
private List<Sku> skus;
|
||||
|
||||
/**
|
||||
* 商品 Sku 明细 BO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class Sku implements Serializable {
|
||||
|
||||
/**
|
||||
* sku 编号
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 商品编号
|
||||
*/
|
||||
private Integer spuId;
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
private String picURL;
|
||||
/**
|
||||
* 规格值数组
|
||||
*/
|
||||
private List<ProductAttrAndValuePairBO> attrs;
|
||||
/**
|
||||
* 价格,单位:分
|
||||
*/
|
||||
private Integer price;
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
private Integer quantity;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user