商品 Spu + Sku 部分 API 提交
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
package cn.iocoder.mall.product.dataobject;
|
||||
|
||||
import java.util.Date;
|
||||
import cn.iocoder.common.framework.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 商品 SKU
|
||||
*/
|
||||
public class ProductSkuDO {
|
||||
public class ProductSkuDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* sku 编号
|
||||
@@ -22,7 +22,7 @@ public class ProductSkuDO {
|
||||
* 状态
|
||||
*
|
||||
* 1-正常
|
||||
* 2-删除
|
||||
* 2-禁用
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
@@ -36,24 +36,20 @@ public class ProductSkuDO {
|
||||
*/
|
||||
private String attrs;
|
||||
/**
|
||||
* 价格,单位分
|
||||
* 价格,单位:分
|
||||
*/
|
||||
private Integer price;
|
||||
/**
|
||||
* 商品在付款减库存的状态下,该Sku上未付款的订单数量
|
||||
* 库存数量
|
||||
*/
|
||||
private Integer withHoldQuantity;
|
||||
/**
|
||||
* 销量
|
||||
*/
|
||||
private Integer soldNum;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
private Integer quantity;
|
||||
// /**
|
||||
// * 商品在付款减库存的状态下,该Sku上未付款的订单数量
|
||||
// */
|
||||
// private Integer withHoldQuantity;
|
||||
// /**
|
||||
// * 销量
|
||||
// */
|
||||
// private Integer soldNum;
|
||||
|
||||
}
|
||||
@@ -1,36 +1,18 @@
|
||||
package cn.iocoder.mall.product.dataobject;
|
||||
|
||||
import java.util.Date;
|
||||
import cn.iocoder.common.framework.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 商品 SPU
|
||||
*/
|
||||
public class ProductSpuDO {
|
||||
|
||||
// ========== 基础字段 =========
|
||||
public class ProductSpuDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* SPU 编号
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
// TODO 店铺编号
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 最后更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 状态
|
||||
*
|
||||
* 1-正常
|
||||
* 2-删除
|
||||
*/
|
||||
private Integer status;
|
||||
// TODO 店铺编号 先不考虑,因为第一个版本,不做 B2B2C
|
||||
|
||||
// ========== 基本信息 =========
|
||||
/**
|
||||
@@ -38,9 +20,13 @@ public class ProductSpuDO {
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* SPU 描述
|
||||
* 卖点
|
||||
*/
|
||||
private String descrption;
|
||||
private String sellPoint;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 分类编号
|
||||
*/
|
||||
@@ -52,7 +38,7 @@ public class ProductSpuDO {
|
||||
*
|
||||
* 建议尺寸:800*800像素,你可以拖拽图片调整顺序,最多上传15张
|
||||
*/
|
||||
private String picURLs;
|
||||
private String picUrls;
|
||||
|
||||
// TODO 价格库存
|
||||
|
||||
@@ -79,4 +65,66 @@ public class ProductSpuDO {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public ProductSpuDO setName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSellPoint() {
|
||||
return sellPoint;
|
||||
}
|
||||
|
||||
public ProductSpuDO setSellPoint(String sellPoint) {
|
||||
this.sellPoint = sellPoint;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public ProductSpuDO setDescription(String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getCid() {
|
||||
return cid;
|
||||
}
|
||||
|
||||
public ProductSpuDO setCid(Integer cid) {
|
||||
this.cid = cid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPicUrls() {
|
||||
return picUrls;
|
||||
}
|
||||
|
||||
public ProductSpuDO setPicUrls(String picUrls) {
|
||||
this.picUrls = picUrls;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getVisible() {
|
||||
return visible;
|
||||
}
|
||||
|
||||
public ProductSpuDO setVisible(Boolean visible) {
|
||||
this.visible = visible;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
public ProductSpuDO setOrder(Integer order) {
|
||||
this.order = order;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import java.util.Date;
|
||||
/**
|
||||
* Product 库存
|
||||
*/
|
||||
@Deprecated // TODO 芋艿,咱暂时不加库存表和库存服务
|
||||
public class ProductStockDO {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package cn.iocoder.mall.product.service;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.product.api.ProductSpuService;
|
||||
import cn.iocoder.mall.product.api.bo.ProductSpuBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductSpuDetailBO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductSpuAddDTO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductSpuUpdateDTO;
|
||||
import cn.iocoder.mall.product.convert.ProductSpuConvert;
|
||||
import cn.iocoder.mall.product.dao.ProductSpuMapper;
|
||||
import cn.iocoder.mall.product.dataobject.ProductSpuDO;
|
||||
@@ -22,4 +26,14 @@ public class ProductSpuServiceImpl implements ProductSpuService {
|
||||
return ProductSpuConvert.INSTANCE.convert(productSpuDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<ProductSpuDetailBO> addProductSpu(Integer adminId, ProductSpuAddDTO productSpuAddDTO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> updateProductSpu(Integer adminId, ProductSpuUpdateDTO productSpuUpdateDTO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user