feat:商品接口

This commit is contained in:
haoxr 2020-12-24 20:30:54 +08:00
parent 5a58818797
commit 054f147c95
7 changed files with 19 additions and 20 deletions

View File

@ -1,7 +1,7 @@
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 {
private List<SkuDTO> skuList; private List<SkuDTO> skuList;
private List<PmsSpuAttr> attributes; private List<PmsSpuAttrValue> attributes;
private List<PmsCategorySpec> specifications; private List<PmsSpec> specifications;
} }

View File

@ -1,8 +1,9 @@
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 {
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;

View File

@ -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;

View File

@ -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 {
private String name; private String name;
@TableField(exist = false) @TableField(exist = false)
private List<PmsSpuSpec> values = new ArrayList<>(); private List<PmsSpuSpecValue> values = new ArrayList<>();
} }

View File

@ -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;
} }

View File

@ -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;
} }

View File

@ -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;