From ccf9efe891b352406267effe4e6ed8dc7f4ddc5e Mon Sep 17 00:00:00 2001 From: haoxr <1490493387@qq.com> Date: Thu, 5 Nov 2020 18:00:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/youlai/mall/pms/entity/PmsSku.java | 22 +++++++++++ .../com/youlai/mall/pms/entity/PmsSpu.java | 37 +++++++++++++++++++ .../com/youlai/common/web/vo/CascaderVO.java | 2 + 3 files changed, 61 insertions(+) create mode 100644 mall-pms/pms-api/src/main/java/com/youlai/mall/pms/entity/PmsSku.java create mode 100644 mall-pms/pms-api/src/main/java/com/youlai/mall/pms/entity/PmsSpu.java diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/entity/PmsSku.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/entity/PmsSku.java new file mode 100644 index 000000000..82fbd7c48 --- /dev/null +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/entity/PmsSku.java @@ -0,0 +1,22 @@ +package com.youlai.mall.pms.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.youlai.common.core.base.BaseEntity; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class PmsSku extends BaseEntity { + @TableId(type = IdType.AUTO) + private Long id; + private Long spuId; + private String specification; + private String barCode; + private String pic; + private Integer originPrice; + private Integer price; + private Integer vipPrice; + private Integer stock; +} diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/entity/PmsSpu.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/entity/PmsSpu.java new file mode 100644 index 000000000..13c2370b4 --- /dev/null +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/entity/PmsSpu.java @@ -0,0 +1,37 @@ +package com.youlai.mall.pms.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.youlai.common.core.base.BaseEntity; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +@Data +public class PmsSpu extends BaseEntity { + + @TableId(type = IdType.AUTO) + private Long id; + private String name; + private Long categoryId; + private Long brandId; + private BigDecimal originPrice; + private BigDecimal price; + private BigDecimal vipPrice; + private Integer sale; + private String pic; + private String album; + private String unit; + private String description; + private String detail; + private Integer status; + + + @TableField(exist = false) + private String categoryName; + + @TableField(exist = false) + private List skuList; +} diff --git a/youlai-common/common-web/src/main/java/com/youlai/common/web/vo/CascaderVO.java b/youlai-common/common-web/src/main/java/com/youlai/common/web/vo/CascaderVO.java index 090449ac9..94c985e5d 100644 --- a/youlai-common/common-web/src/main/java/com/youlai/common/web/vo/CascaderVO.java +++ b/youlai-common/common-web/src/main/java/com/youlai/common/web/vo/CascaderVO.java @@ -1,5 +1,6 @@ package com.youlai.common.web.vo; +import com.fasterxml.jackson.annotation.JsonInclude; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -20,5 +21,6 @@ public class CascaderVO { private String label; @ApiModelProperty(name="子节点") + @JsonInclude(JsonInclude.Include.NON_EMPTY) private List children; }