增加 user 端的商品分类接口

增加 user 端的商品 spu 接口
This commit is contained in:
YunaiV
2019-03-07 19:36:59 +08:00
parent 335c19e62d
commit 03f6b2b82c
27 changed files with 767 additions and 73 deletions

View File

@@ -11,6 +11,10 @@ public class ProductAttrValueBO {
* 规格值编号
*/
private Integer id;
/**
* 规格编号
*/
private Integer attrId;
/**
* 规格值名
*/
@@ -59,4 +63,13 @@ public class ProductAttrValueBO {
this.createTime = createTime;
return this;
}
public Integer getAttrId() {
return attrId;
}
public ProductAttrValueBO setAttrId(Integer attrId) {
this.attrId = attrId;
return this;
}
}

View File

@@ -48,6 +48,14 @@ public class ProductSpuBO {
*/
private Integer sort;
// ========== Sku 相关字段 =========
/**
* 价格
*
* 目前的计算方式是,以 Sku 最小价格为准
*/
private Integer price;
public Integer getId() {
return id;
}
@@ -120,4 +128,13 @@ public class ProductSpuBO {
return this;
}
public Integer getPrice() {
return price;
}
public ProductSpuBO setPrice(Integer price) {
this.price = price;
return this;
}
}

View File

@@ -26,7 +26,8 @@ public enum ProductErrorCodeEnum {
PRODUCT_ATTR_NOT_EXIST(1003003001, "商品属性值不存在"),
PRODUCT_ATTR_EXISTS(1003003002, "商品规格已经存在"),
PRODUCT_ATTR_STATUS_EQUALS(1003003003, "商品规格已经是该状态"),
PRODUCT_ATTR_VALUE_EXISTS(1003003004, "商品规格值已经存在"),
PRODUCT_ATTR_VALUE_STATUS_EQUALS(1003003005, "商品规格值已经是该状态"),
;
private final int code;

View File

@@ -7,7 +7,20 @@ import javax.validation.constraints.NotNull;
*/
public class ProductSpuPageDTO {
/**
* 商品名
*
* 模糊匹配
*/
private String name;
/**
* 分类编号
*/
private Integer cid;
/**
* 是否可见
*/
private Boolean visible;
@NotNull(message = "页码不能为空")
private Integer pageNo;
@@ -41,4 +54,22 @@ public class ProductSpuPageDTO {
return this;
}
public Integer getCid() {
return cid;
}
public ProductSpuPageDTO setCid(Integer cid) {
this.cid = cid;
return this;
}
public Boolean getVisible() {
return visible;
}
public ProductSpuPageDTO setVisible(Boolean visible) {
this.visible = visible;
return this;
}
}