From bbc85cfe4acbb2cd3f307a5c764e4119bd78c430 Mon Sep 17 00:00:00 2001 From: clunt Date: Thu, 10 Feb 2022 14:02:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E6=A8=A1=E5=9D=97=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ghy/common/enums/GoodsStatus.java | 4 +- .../main/java/com/ghy/goods/domain/Goods.java | 159 +++++++++++++++++- .../com/ghy/goods/domain/GoodsCategory.java | 27 +++ .../java/com/ghy/goods/domain/GoodsTag.java | 13 ++ 4 files changed, 199 insertions(+), 4 deletions(-) create mode 100644 ghy-goods/src/main/java/com/ghy/goods/domain/GoodsCategory.java create mode 100644 ghy-goods/src/main/java/com/ghy/goods/domain/GoodsTag.java diff --git a/ghy-common/src/main/java/com/ghy/common/enums/GoodsStatus.java b/ghy-common/src/main/java/com/ghy/common/enums/GoodsStatus.java index 1863fde0..0ebcc39c 100644 --- a/ghy-common/src/main/java/com/ghy/common/enums/GoodsStatus.java +++ b/ghy-common/src/main/java/com/ghy/common/enums/GoodsStatus.java @@ -5,8 +5,8 @@ package com.ghy.common.enums; */ public enum GoodsStatus { - OK("0", "正常"), - DISABLE("1", "停用"), + OK("0", "上架"), + DISABLE("1", "下架"), DELETED("2", "删除");; private final String code; diff --git a/ghy-goods/src/main/java/com/ghy/goods/domain/Goods.java b/ghy-goods/src/main/java/com/ghy/goods/domain/Goods.java index c8178d0f..6b7785a2 100644 --- a/ghy-goods/src/main/java/com/ghy/goods/domain/Goods.java +++ b/ghy-goods/src/main/java/com/ghy/goods/domain/Goods.java @@ -5,6 +5,11 @@ import com.ghy.common.core.domain.BaseEntity; import java.math.BigDecimal; +/** + * 商品 + * + * @author clunt + */ public class Goods extends BaseEntity { private static final long serialVersionUID = 1L; @@ -15,13 +20,163 @@ public class Goods extends BaseEntity { @Excel(name = "编码") private String goodsCode; + @Excel(name = "店铺id") + private Long storeId; + @Excel(name = "名称") private String goodsName; @Excel(name = "价格") private BigDecimal goodsPrice; - /** 状态(0正常 1停用) */ - @Excel(name = "状态", readConverterExp = "0=正常,1=停用") + /** 岗位排序 */ + @Excel(name = "商品排序", cellType = Excel.ColumnType.NUMERIC) + private String goodsSort; + + /** 状态(0上架 1下架 2删除) */ + @Excel(name = "状态", readConverterExp = "0=上架,1=下架,2删除") private String status; + + @Excel(name = "类别id") + private Long goodsCategoryId; + + @Excel(name = "商品位置id") + private Long storeLocalId; + + @Excel(name = "商品图片", cellType = Excel.ColumnType.IMAGE) + private String goodsImgUrl; + + @Excel(name = "商品标签id") + private Long goodsLabelId; + + @Excel(name = "商品库存,-1则表示无限制", cellType = Excel.ColumnType.NUMERIC) + private Integer goodsNumber; + + @Excel(name = "描述") + private String remark; + + public Long getGoodsId() { + return goodsId; + } + + public void setGoodsId(Long goodsId) { + this.goodsId = goodsId; + } + + public String getGoodsCode() { + return goodsCode; + } + + public void setGoodsCode(String goodsCode) { + this.goodsCode = goodsCode; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public BigDecimal getGoodsPrice() { + return goodsPrice; + } + + public void setGoodsPrice(BigDecimal goodsPrice) { + this.goodsPrice = goodsPrice; + } + + public String getGoodsSort() { + return goodsSort; + } + + public void setGoodsSort(String goodsSort) { + this.goodsSort = goodsSort; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Long getGoodsCategoryId() { + return goodsCategoryId; + } + + public void setGoodsCategoryId(Long goodsCategoryId) { + this.goodsCategoryId = goodsCategoryId; + } + + public String getGoodsImgUrl() { + return goodsImgUrl; + } + + public void setGoodsImgUrl(String goodsImgUrl) { + this.goodsImgUrl = goodsImgUrl; + } + + public Long getGoodsLabelId() { + return goodsLabelId; + } + + public void setGoodsLabelId(Long goodsLabelId) { + this.goodsLabelId = goodsLabelId; + } + + public Integer getGoodsNumber() { + return goodsNumber; + } + + public void setGoodsNumber(Integer goodsNumber) { + this.goodsNumber = goodsNumber; + } + + @Override + public String getRemark() { + return remark; + } + + @Override + public void setRemark(String remark) { + this.remark = remark; + } + + public Long getStoreId() { + return storeId; + } + + public void setStoreId(Long storeId) { + this.storeId = storeId; + } + + public Long getStoreLocalId() { + return storeLocalId; + } + + public void setStoreLocalId(Long storeLocalId) { + this.storeLocalId = storeLocalId; + } + + @Override + public String toString() { + return "Goods{" + + "goodsId=" + goodsId + + ", goodsCode='" + goodsCode + '\'' + + ", storeId=" + storeId + + ", goodsName='" + goodsName + '\'' + + ", goodsPrice=" + goodsPrice + + ", goodsSort='" + goodsSort + '\'' + + ", status='" + status + '\'' + + ", goodsCategoryId=" + goodsCategoryId + + ", storeLocalId=" + storeLocalId + + ", goodsImgUrl='" + goodsImgUrl + '\'' + + ", goodsLabelId=" + goodsLabelId + + ", goodsNumber=" + goodsNumber + + ", remark='" + remark + '\'' + + '}'; + } } diff --git a/ghy-goods/src/main/java/com/ghy/goods/domain/GoodsCategory.java b/ghy-goods/src/main/java/com/ghy/goods/domain/GoodsCategory.java new file mode 100644 index 00000000..69891196 --- /dev/null +++ b/ghy-goods/src/main/java/com/ghy/goods/domain/GoodsCategory.java @@ -0,0 +1,27 @@ +package com.ghy.goods.domain; + + +import com.ghy.common.annotation.Excel; +import com.ghy.common.core.domain.BaseEntity; + +/** + * 商品类别表 + * + * @author clunt + */ +public class GoodsCategory extends BaseEntity { + + private static final long serialVersionUID = 1L; + + @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC) + private Long goodsCategoryId; + + @Excel(name = "类别编码", cellType = Excel.ColumnType.STRING) + private String goodsCategoryCode; + + @Excel(name = "类别名称", cellType = Excel.ColumnType.STRING) + private String goodsCategoryName; + + + +} diff --git a/ghy-goods/src/main/java/com/ghy/goods/domain/GoodsTag.java b/ghy-goods/src/main/java/com/ghy/goods/domain/GoodsTag.java new file mode 100644 index 00000000..762266e7 --- /dev/null +++ b/ghy-goods/src/main/java/com/ghy/goods/domain/GoodsTag.java @@ -0,0 +1,13 @@ +package com.ghy.goods.domain; + +import com.ghy.common.core.domain.BaseEntity; + +/** + * 商品标签 + */ + +public class GoodsTag extends BaseEntity { + + + +}