diff --git a/ghy-common/pom.xml b/ghy-common/pom.xml index 82747ca7..1d828563 100644 --- a/ghy-common/pom.xml +++ b/ghy-common/pom.xml @@ -17,6 +17,11 @@ + + org.projectlombok + lombok + + org.springframework 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 6b7785a2..63fda724 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 @@ -2,6 +2,7 @@ package com.ghy.goods.domain; import com.ghy.common.annotation.Excel; import com.ghy.common.core.domain.BaseEntity; +import lombok.Data; import java.math.BigDecimal; @@ -10,6 +11,7 @@ import java.math.BigDecimal; * * @author clunt */ +@Data public class Goods extends BaseEntity { private static final long serialVersionUID = 1L; @@ -20,8 +22,8 @@ public class Goods extends BaseEntity { @Excel(name = "编码") private String goodsCode; - @Excel(name = "店铺id") - private Long storeId; + @Excel(name = "公司id") + private Long companyId; @Excel(name = "名称") private String goodsName; @@ -40,143 +42,13 @@ public class Goods extends BaseEntity { @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 index 69891196..abded166 100644 --- a/ghy-goods/src/main/java/com/ghy/goods/domain/GoodsCategory.java +++ b/ghy-goods/src/main/java/com/ghy/goods/domain/GoodsCategory.java @@ -3,12 +3,14 @@ package com.ghy.goods.domain; import com.ghy.common.annotation.Excel; import com.ghy.common.core.domain.BaseEntity; +import lombok.Data; /** * 商品类别表 * * @author clunt */ +@Data public class GoodsCategory extends BaseEntity { private static final long serialVersionUID = 1L; diff --git a/ghy-goods/src/main/java/com/ghy/goods/mapper/GoodsMapper.java b/ghy-goods/src/main/java/com/ghy/goods/mapper/GoodsMapper.java new file mode 100644 index 00000000..2f1e7b63 --- /dev/null +++ b/ghy-goods/src/main/java/com/ghy/goods/mapper/GoodsMapper.java @@ -0,0 +1,23 @@ +package com.ghy.goods.mapper; + +import com.ghy.goods.domain.Goods; + +import java.util.List; + +/** + * @author clunt + * 商品的mapper层 + */ +public interface GoodsMapper { + + /** + * @param goods 商品入参 + * @return 商品集合 + */ + public List selectGoodsList(Goods goods); + + + + + +} diff --git a/ghy-goods/src/main/resources/mapper.goods/GoodsMapper.xml b/ghy-goods/src/main/resources/mapper.goods/GoodsMapper.xml new file mode 100644 index 00000000..d98926a5 --- /dev/null +++ b/ghy-goods/src/main/resources/mapper.goods/GoodsMapper.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + select goods_id, goods_code, company_id, goods_name, goods_price, goods_sort, goods_category_id, + goods_img_url, goods_number, status, create_by, create_time, remark + from sys_post + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index c1f69a01..b8ab1020 100644 --- a/pom.xml +++ b/pom.xml @@ -33,12 +33,17 @@ 4.1.2 2.3 2.17.1 + 1.18.12 - + + org.projectlombok + lombok + ${lombok.version} + org.springframework.boot