提交 054f147c 编写于 作者: H haoxr

feat:商品接口

上级 5a588187
package com.youlai.mall.pms.bo; package com.youlai.mall.pms.bo;
import com.youlai.mall.pms.pojo.PmsSpuAttr; import com.youlai.mall.pms.pojo.PmsSpuAttrValue;
import com.youlai.mall.pms.pojo.PmsCategorySpec; import com.youlai.mall.pms.pojo.PmsSpec;
import com.youlai.mall.pms.pojo.dto.SkuDTO; import com.youlai.mall.pms.pojo.dto.SkuDTO;
import com.youlai.mall.pms.pojo.dto.SpuDTO; import com.youlai.mall.pms.pojo.dto.SpuDTO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -19,8 +19,8 @@ public class AppProductBO { ...@@ -19,8 +19,8 @@ public class AppProductBO {
private List<SkuDTO> skuList; private List<SkuDTO> skuList;
private List<PmsSpuAttr> attributes; private List<PmsSpuAttrValue> attributes;
private List<PmsCategorySpec> specifications; private List<PmsSpec> specifications;
} }
package com.youlai.mall.pms.bo; package com.youlai.mall.pms.bo;
import com.youlai.mall.pms.pojo.PmsSku; import com.youlai.mall.pms.pojo.PmsSku;
import com.youlai.mall.pms.pojo.PmsCategorySpec; import com.youlai.mall.pms.pojo.PmsSpec;
import com.youlai.mall.pms.pojo.PmsSpuAttr; import com.youlai.mall.pms.pojo.PmsSpuAttrValue;
import com.youlai.mall.pms.pojo.PmsSpuSpecValue;
import com.youlai.mall.pms.pojo.dto.SpuDTO; import com.youlai.mall.pms.pojo.dto.SpuDTO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
...@@ -17,9 +18,9 @@ public class ProductBO { ...@@ -17,9 +18,9 @@ public class ProductBO {
private SpuDTO spu; private SpuDTO spu;
private List<PmsSpuAttr> attributes; private List<PmsSpuAttrValue> attrs;
private List<PmsCategorySpec> specifications; private List<PmsSpuSpecValue> specs;
private List<PmsSku> skuList; private List<PmsSku> skuList;
......
...@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId; ...@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data; import lombok.Data;
@Data @Data
public class PmsCategoryAttr { public class PmsAttr {
@TableId(type=IdType.AUTO) @TableId(type=IdType.AUTO)
private Long id; private Long id;
......
...@@ -9,7 +9,7 @@ import java.util.ArrayList; ...@@ -9,7 +9,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
@Data @Data
public class PmsCategorySpec { public class PmsSpec {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Long id; private Long id;
...@@ -17,6 +17,6 @@ public class PmsCategorySpec { ...@@ -17,6 +17,6 @@ public class PmsCategorySpec {
private String name; private String name;
@TableField(exist = false) @TableField(exist = false)
private List<PmsSpuSpec> values = new ArrayList<>(); private List<PmsSpuSpecValue> values = new ArrayList<>();
} }
...@@ -11,14 +11,13 @@ import lombok.Data; ...@@ -11,14 +11,13 @@ import lombok.Data;
* @date 2020-11-06 * @date 2020-11-06
*/ */
@Data @Data
public class PmsSpuAttr extends BaseEntity { public class PmsSpuAttrValue extends BaseEntity {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Long id; private Long id;
private Long spuId; private Long spuId;
private Long attrCategoryId; private Long attrId;
private String name;
private String value; private String value;
@TableField(exist = false)
private String name;
} }
...@@ -10,11 +10,11 @@ import lombok.Data; ...@@ -10,11 +10,11 @@ import lombok.Data;
* @date 2020-11-06 * @date 2020-11-06
*/ */
@Data @Data
public class PmsSpuSpec extends BaseEntity { public class PmsSpuSpecValue extends BaseEntity {
@TableId(type = IdType.AUTO) @TableId(type = IdType.INPUT)
private Long id; private Long id;
private Long spuId; private Long spuId;
private Long specCategoryId; private Long specId;
private String value; private String value;
} }
...@@ -13,8 +13,7 @@ public class SpuDTO { ...@@ -13,8 +13,7 @@ public class SpuDTO {
private Long brandId; private Long brandId;
private Long originPrice; private Long originPrice;
private Long price; private Long price;
private String pic; private List<String> picUrls;
private List<String> pics;
private String unit; private String unit;
private String description; private String description;
private String detail; private String detail;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册