diff --git a/product/product-application/pom.xml b/product/product-application/pom.xml index 9454e14b1..4558849d3 100644 --- a/product/product-application/pom.xml +++ b/product/product-application/pom.xml @@ -100,9 +100,6 @@ org.springframework.boot spring-boot-maven-plugin - - true - diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductCategoryController.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductCategoryController.java index 4adc3cb9c..c71ea9e55 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductCategoryController.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductCategoryController.java @@ -36,7 +36,7 @@ public class AdminsProductCategoryController { public CommonResult> tree() { List productCategories = productCategoryService.getAll().getData(); // 创建 ProductCategoryTreeNodeVO Map - Map treeNodeMap = productCategories.stream().collect(Collectors.toMap(ProductCategoryBO::getId, ProductCategoryConvert.INSTANCE::convert)); + Map treeNodeMap = productCategories.stream().collect(Collectors.toMap(ProductCategoryBO::getId, ProductCategoryConvert.Admins.INSTANCE::convert)); // 处理父子关系 treeNodeMap.values().stream() .filter(node -> !node.getPid().equals(ProductCategoryConstants.PID_ROOT)) @@ -77,7 +77,7 @@ public class AdminsProductCategoryController { // 创建商品分类 CommonResult result = productCategoryService.addProductCategory(AdminSecurityContextHolder.getContext().getAdminId(), productCategoryAddDTO); // 返回结果 - return ProductCategoryConvert.INSTANCE.convert2(result); + return ProductCategoryConvert.Admins.INSTANCE.convert2(result); } @PostMapping("/update") @@ -121,4 +121,4 @@ public class AdminsProductCategoryController { return productCategoryService.deleteProductCategory(AdminSecurityContextHolder.getContext().getAdminId(), id); } -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/users/UsersProductCategoryController.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/users/UsersProductCategoryController.java index 59426eaa2..5091e96d8 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/users/UsersProductCategoryController.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/users/UsersProductCategoryController.java @@ -29,7 +29,7 @@ public class UsersProductCategoryController { @ApiImplicitParam(name = "pid", value = "指定分类编号", required = true, example = "0") public CommonResult> list(@RequestParam("pid") Integer pid) { List result = productCategoryService.getListByPid(pid); - return CommonResult.success(ProductCategoryConvert.INSTANCE.convertToVO(result)); + return CommonResult.success(ProductCategoryConvert.Users.INSTANCE.convertToVO(result)); } -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/convert/ProductCategoryConvert.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/convert/ProductCategoryConvert.java index 22fd4d9e3..1b44f6a67 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/convert/ProductCategoryConvert.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/convert/ProductCategoryConvert.java @@ -2,30 +2,41 @@ package cn.iocoder.mall.product.application.convert; import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.mall.product.api.bo.ProductCategoryBO; -import cn.iocoder.mall.product.application.vo.users.UsersProductCategoryVO; import cn.iocoder.mall.product.application.vo.admins.AdminsProductCategoryTreeNodeVO; import cn.iocoder.mall.product.application.vo.admins.AdminsProductCategoryVO; +import cn.iocoder.mall.product.application.vo.users.UsersProductCategoryVO; import org.mapstruct.Mapper; import org.mapstruct.Mappings; import org.mapstruct.factory.Mappers; import java.util.List; -@Mapper public interface ProductCategoryConvert { - ProductCategoryConvert INSTANCE = Mappers.getMapper(ProductCategoryConvert.class); + @Mapper + interface Users { - @Mappings({}) - UsersProductCategoryVO convertToVO(ProductCategoryBO category); + Users INSTANCE = Mappers.getMapper(Users.class); - @Mappings({}) - List convertToVO(List categoryList); + @Mappings({}) + UsersProductCategoryVO convertToVO(ProductCategoryBO category); - @Mappings({}) - AdminsProductCategoryTreeNodeVO convert(ProductCategoryBO category); + @Mappings({}) + List convertToVO(List categoryList); - @Mappings({}) - CommonResult convert2(CommonResult result); + } + + @Mapper + interface Admins { + + Admins INSTANCE = Mappers.getMapper(Admins.class); + + @Mappings({}) + AdminsProductCategoryTreeNodeVO convert(ProductCategoryBO category); + + @Mappings({}) + CommonResult convert2(CommonResult result); + + } } diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrAndValuePairVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrAndValuePairVO.java index 7d6aeb2f7..33c6fb643 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrAndValuePairVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrAndValuePairVO.java @@ -2,8 +2,12 @@ package cn.iocoder.mall.product.application.vo.admins; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; @ApiModel(value = "商品规格属性和值对 VO") +@Data +@Accessors(chain = true) public class AdminsProductAttrAndValuePairVO { @ApiModelProperty(value = "规格编号", required = true, example = "1") @@ -15,40 +19,4 @@ public class AdminsProductAttrAndValuePairVO { @ApiModelProperty(value = "规格值名", required = true, example = "红色") private String attrValueName; - public Integer getAttrId() { - return attrId; - } - - public AdminsProductAttrAndValuePairVO setAttrId(Integer attrId) { - this.attrId = attrId; - return this; - } - - public String getAttrName() { - return attrName; - } - - public AdminsProductAttrAndValuePairVO setAttrName(String attrName) { - this.attrName = attrName; - return this; - } - - public Integer getAttrValueId() { - return attrValueId; - } - - public AdminsProductAttrAndValuePairVO setAttrValueId(Integer attrValueId) { - this.attrValueId = attrValueId; - return this; - } - - public String getAttrValueName() { - return attrValueName; - } - - public AdminsProductAttrAndValuePairVO setAttrValueName(String attrValueName) { - this.attrValueName = attrValueName; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrDetailVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrDetailVO.java index 8b5660062..edf2cf0a6 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrDetailVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrDetailVO.java @@ -2,11 +2,15 @@ package cn.iocoder.mall.product.application.vo.admins; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; import java.util.Date; import java.util.List; @ApiModel(value = "商品规格明细 VO", description = "带有规格值数组") +@Data +@Accessors(chain = true) public class AdminsProductAttrDetailVO { @ApiModelProperty(value = "规格编号", required = true, example = "1") @@ -20,49 +24,4 @@ public class AdminsProductAttrDetailVO { @ApiModelProperty(value = "规格值数组", required = true) private List values; - public Integer getId() { - return id; - } - - public AdminsProductAttrDetailVO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public AdminsProductAttrDetailVO setName(String name) { - this.name = name; - return this; - } - - public Integer getStatus() { - return status; - } - - public AdminsProductAttrDetailVO setStatus(Integer status) { - this.status = status; - return this; - } - - public Date getCreateTime() { - return createTime; - } - - public AdminsProductAttrDetailVO setCreateTime(Date createTime) { - this.createTime = createTime; - return this; - } - - public List getValues() { - return values; - } - - public AdminsProductAttrDetailVO setValues(List values) { - this.values = values; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrPageVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrPageVO.java index 44a5c67e8..73fe8e343 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrPageVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrPageVO.java @@ -2,10 +2,14 @@ package cn.iocoder.mall.product.application.vo.admins; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; import java.util.List; @ApiModel(value = "商品规格明细分页 VO") +@Data +@Accessors(chain = true) public class AdminsProductAttrPageVO { @ApiModelProperty(value = "规格数组", required = true) @@ -13,22 +17,4 @@ public class AdminsProductAttrPageVO { @ApiModelProperty(value = "总数", required = true) private Integer count; - public List getAttrs() { - return attrs; - } - - public AdminsProductAttrPageVO setAttrs(List attrs) { - this.attrs = attrs; - return this; - } - - public Integer getCount() { - return count; - } - - public AdminsProductAttrPageVO setCount(Integer count) { - this.count = count; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrSimpleVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrSimpleVO.java index c446654a5..b734772f0 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrSimpleVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrSimpleVO.java @@ -2,10 +2,14 @@ package cn.iocoder.mall.product.application.vo.admins; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; import java.util.List; @ApiModel(value = "商品规格精简 VO", description = "带有规格值数组") +@Data +@Accessors(chain = true) public class AdminsProductAttrSimpleVO { @ApiModelProperty(value = "规格编号", required = true, example = "1") @@ -15,31 +19,4 @@ public class AdminsProductAttrSimpleVO { @ApiModelProperty(value = "规格值数组", required = true) private List values; - public Integer getId() { - return id; - } - - public AdminsProductAttrSimpleVO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public AdminsProductAttrSimpleVO setName(String name) { - this.name = name; - return this; - } - - public List getValues() { - return values; - } - - public AdminsProductAttrSimpleVO setValues(List values) { - this.values = values; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrVO.java index c0767df56..1e75a2d30 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrVO.java @@ -2,10 +2,14 @@ package cn.iocoder.mall.product.application.vo.admins; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; import java.util.Date; @ApiModel(value = "商品规格 VO", description = "不带有规格值数组") +@Data +@Accessors(chain = true) public class AdminsProductAttrVO { @ApiModelProperty(value = "规格编号", required = true, example = "1") @@ -17,39 +21,4 @@ public class AdminsProductAttrVO { @ApiModelProperty(value = "创建时间", required = true, example = "时间戳") private Date createTime; - public Integer getId() { - return id; - } - - public AdminsProductAttrVO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public AdminsProductAttrVO setName(String name) { - this.name = name; - return this; - } - - public Integer getStatus() { - return status; - } - - public AdminsProductAttrVO setStatus(Integer status) { - this.status = status; - return this; - } - - public Date getCreateTime() { - return createTime; - } - - public AdminsProductAttrVO setCreateTime(Date createTime) { - this.createTime = createTime; - return this; - } -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrValueDetailVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrValueDetailVO.java index 3276afe4a..2bb8182af 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrValueDetailVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrValueDetailVO.java @@ -2,10 +2,14 @@ package cn.iocoder.mall.product.application.vo.admins; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; import java.util.Date; @ApiModel(value = "商品规格值 VO") +@Data +@Accessors(chain = true) public class AdminsProductAttrValueDetailVO { @ApiModelProperty(value = "规格值编号", required = true, example = "1") @@ -17,40 +21,4 @@ public class AdminsProductAttrValueDetailVO { @ApiModelProperty(value = "创建时间", required = true, example = "时间戳") private Date createTime; - public Integer getId() { - return id; - } - - public AdminsProductAttrValueDetailVO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public AdminsProductAttrValueDetailVO setName(String name) { - this.name = name; - return this; - } - - public Integer getStatus() { - return status; - } - - public AdminsProductAttrValueDetailVO setStatus(Integer status) { - this.status = status; - return this; - } - - public Date getCreateTime() { - return createTime; - } - - public AdminsProductAttrValueDetailVO setCreateTime(Date createTime) { - this.createTime = createTime; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrValueSimpleVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrValueSimpleVO.java index c814343c8..bcd12b54e 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrValueSimpleVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrValueSimpleVO.java @@ -2,8 +2,12 @@ package cn.iocoder.mall.product.application.vo.admins; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; @ApiModel(value = "商品规格值精简 VO") +@Data +@Accessors(chain = true) public class AdminsProductAttrValueSimpleVO { @ApiModelProperty(value = "规格值编号", required = true, example = "1") @@ -11,22 +15,4 @@ public class AdminsProductAttrValueSimpleVO { @ApiModelProperty(value = "规格值名", required = true, example = "颜色") private String name; - public Integer getId() { - return id; - } - - public AdminsProductAttrValueSimpleVO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public AdminsProductAttrValueSimpleVO setName(String name) { - this.name = name; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrValueVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrValueVO.java index 187ce2f7a..0829891a6 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrValueVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductAttrValueVO.java @@ -2,10 +2,14 @@ package cn.iocoder.mall.product.application.vo.admins; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; import java.util.Date; @ApiModel(value = "商品规格值 VO") +@Data +@Accessors(chain = true) public class AdminsProductAttrValueVO { @ApiModelProperty(value = "规格值编号", required = true, example = "1") @@ -19,49 +23,4 @@ public class AdminsProductAttrValueVO { @ApiModelProperty(value = "创建时间", required = true, example = "时间戳") private Date createTime; - public Integer getId() { - return id; - } - - public AdminsProductAttrValueVO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public AdminsProductAttrValueVO setName(String name) { - this.name = name; - return this; - } - - public Integer getStatus() { - return status; - } - - public AdminsProductAttrValueVO setStatus(Integer status) { - this.status = status; - return this; - } - - public Date getCreateTime() { - return createTime; - } - - public AdminsProductAttrValueVO setCreateTime(Date createTime) { - this.createTime = createTime; - return this; - } - - public Integer getAttrId() { - return attrId; - } - - public AdminsProductAttrValueVO setAttrId(Integer attrId) { - this.attrId = attrId; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductCategoryTreeNodeVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductCategoryTreeNodeVO.java index 526db8268..6a7b35adc 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductCategoryTreeNodeVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductCategoryTreeNodeVO.java @@ -2,11 +2,15 @@ package cn.iocoder.mall.product.application.vo.admins; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; import java.util.Date; import java.util.List; @ApiModel("产品分类树节点 VO") +@Data +@Accessors(chain = true) public class AdminsProductCategoryTreeNodeVO { @ApiModelProperty(value = "分类编号", required = true, example = "1") @@ -28,85 +32,4 @@ public class AdminsProductCategoryTreeNodeVO { @ApiModelProperty(value = "子节点数组") private List children; - public Integer getId() { - return id; - } - - public AdminsProductCategoryTreeNodeVO setId(Integer id) { - this.id = id; - return this; - } - - public Integer getPid() { - return pid; - } - - public AdminsProductCategoryTreeNodeVO setPid(Integer pid) { - this.pid = pid; - return this; - } - - public String getName() { - return name; - } - - public AdminsProductCategoryTreeNodeVO setName(String name) { - this.name = name; - return this; - } - - public String getDescription() { - return description; - } - - public AdminsProductCategoryTreeNodeVO setDescription(String description) { - this.description = description; - return this; - } - - public String getPicUrl() { - return picUrl; - } - - public AdminsProductCategoryTreeNodeVO setPicUrl(String picUrl) { - this.picUrl = picUrl; - return this; - } - - public Integer getSort() { - return sort; - } - - public AdminsProductCategoryTreeNodeVO setSort(Integer sort) { - this.sort = sort; - return this; - } - - public Integer getStatus() { - return status; - } - - public AdminsProductCategoryTreeNodeVO setStatus(Integer status) { - this.status = status; - return this; - } - - public Date getCreateTime() { - return createTime; - } - - public AdminsProductCategoryTreeNodeVO setCreateTime(Date createTime) { - this.createTime = createTime; - return this; - } - - public List getChildren() { - return children; - } - - public AdminsProductCategoryTreeNodeVO setChildren(List children) { - this.children = children; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductCategoryVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductCategoryVO.java index 4a309b383..b52374f27 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductCategoryVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductCategoryVO.java @@ -2,10 +2,14 @@ package cn.iocoder.mall.product.application.vo.admins; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; import java.util.Date; @ApiModel("产品分类 VO") +@Data +@Accessors(chain = true) public class AdminsProductCategoryVO { @ApiModelProperty(value = "分类编号", required = true, example = "1") @@ -25,76 +29,4 @@ public class AdminsProductCategoryVO { @ApiModelProperty(value = "创建时间", required = true, example = "时间戳") private Date createTime; - public Integer getId() { - return id; - } - - public AdminsProductCategoryVO setId(Integer id) { - this.id = id; - return this; - } - - public Integer getPid() { - return pid; - } - - public AdminsProductCategoryVO setPid(Integer pid) { - this.pid = pid; - return this; - } - - public String getName() { - return name; - } - - public AdminsProductCategoryVO setName(String name) { - this.name = name; - return this; - } - - public String getDescription() { - return description; - } - - public AdminsProductCategoryVO setDescription(String description) { - this.description = description; - return this; - } - - public String getPicUrl() { - return picUrl; - } - - public AdminsProductCategoryVO setPicUrl(String picUrl) { - this.picUrl = picUrl; - return this; - } - - public Integer getSort() { - return sort; - } - - public AdminsProductCategoryVO setSort(Integer sort) { - this.sort = sort; - return this; - } - - public Integer getStatus() { - return status; - } - - public AdminsProductCategoryVO setStatus(Integer status) { - this.status = status; - return this; - } - - public Date getCreateTime() { - return createTime; - } - - public AdminsProductCategoryVO setCreateTime(Date createTime) { - this.createTime = createTime; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductSkuDetailVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductSkuDetailVO.java index bf35708cc..bc80242ca 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductSkuDetailVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductSkuDetailVO.java @@ -1,12 +1,16 @@ package cn.iocoder.mall.product.application.vo.admins; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; import java.util.List; /** * 商品 Sku 明细 BO */ +@Data +@Accessors(chain = true) public class AdminsProductSkuDetailVO { @ApiModelProperty(value = "sku 编号", required = true, example = "1") @@ -22,58 +26,4 @@ public class AdminsProductSkuDetailVO { @ApiModelProperty(value = "库存数量", required = true, example = "100") private Integer quantity; - public Integer getId() { - return id; - } - - public AdminsProductSkuDetailVO setId(Integer id) { - this.id = id; - return this; - } - - public Integer getSpuId() { - return spuId; - } - - public AdminsProductSkuDetailVO setSpuId(Integer spuId) { - this.spuId = spuId; - return this; - } - - public String getPicURL() { - return picURL; - } - - public AdminsProductSkuDetailVO setPicURL(String picURL) { - this.picURL = picURL; - return this; - } - - public Integer getPrice() { - return price; - } - - public AdminsProductSkuDetailVO setPrice(Integer price) { - this.price = price; - return this; - } - - public Integer getQuantity() { - return quantity; - } - - public AdminsProductSkuDetailVO setQuantity(Integer quantity) { - this.quantity = quantity; - return this; - } - - public List getAttrs() { - return attrs; - } - - public AdminsProductSkuDetailVO setAttrs(List attrs) { - this.attrs = attrs; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductSpuDetailVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductSpuDetailVO.java index 2b5d0d5d5..7626f96df 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductSpuDetailVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductSpuDetailVO.java @@ -2,10 +2,14 @@ package cn.iocoder.mall.product.application.vo.admins; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; import java.util.List; @ApiModel(value = "商品 SPU 详细 VO", description = "包括 SKU 信息 VO") +@Data +@Accessors(chain = true) public class AdminsProductSpuDetailVO { @ApiModelProperty(value = "SPU 编号", required = true, example = "1") @@ -36,85 +40,4 @@ public class AdminsProductSpuDetailVO { */ private List skus; - public Integer getId() { - return id; - } - - public AdminsProductSpuDetailVO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public AdminsProductSpuDetailVO setName(String name) { - this.name = name; - return this; - } - - public String getSellPoint() { - return sellPoint; - } - - public AdminsProductSpuDetailVO setSellPoint(String sellPoint) { - this.sellPoint = sellPoint; - return this; - } - - public String getDescription() { - return description; - } - - public AdminsProductSpuDetailVO setDescription(String description) { - this.description = description; - return this; - } - - public Integer getCid() { - return cid; - } - - public AdminsProductSpuDetailVO setCid(Integer cid) { - this.cid = cid; - return this; - } - - public List getPicUrls() { - return picUrls; - } - - public AdminsProductSpuDetailVO setPicUrls(List picUrls) { - this.picUrls = picUrls; - return this; - } - - public Boolean getVisible() { - return visible; - } - - public AdminsProductSpuDetailVO setVisible(Boolean visible) { - this.visible = visible; - return this; - } - - public Integer getSort() { - return sort; - } - - public AdminsProductSpuDetailVO setSort(Integer sort) { - this.sort = sort; - return this; - } - - public List getSkus() { - return skus; - } - - public AdminsProductSpuDetailVO setSkus(List skus) { - this.skus = skus; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductSpuPageVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductSpuPageVO.java index 4e381cb77..f81151a9b 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductSpuPageVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductSpuPageVO.java @@ -2,10 +2,14 @@ package cn.iocoder.mall.product.application.vo.admins; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; import java.util.List; @ApiModel("商品 SPU 分页 VO") +@Data +@Accessors(chain = true) public class AdminsProductSpuPageVO { @ApiModelProperty(value = "spu 数组", required = true) @@ -13,22 +17,4 @@ public class AdminsProductSpuPageVO { @ApiModelProperty(value = "总数", required = true) private Integer count; - public List getSpus() { - return spus; - } - - public AdminsProductSpuPageVO setSpus(List spus) { - this.spus = spus; - return this; - } - - public Integer getCount() { - return count; - } - - public AdminsProductSpuPageVO setCount(Integer count) { - this.count = count; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductSpuVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductSpuVO.java index 1011dbd62..dddf86389 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductSpuVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductSpuVO.java @@ -2,10 +2,14 @@ package cn.iocoder.mall.product.application.vo.admins; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; import java.util.List; @ApiModel(value = "商品 SPU VO", description = "不包括 SKU 信息 VO") +@Data +@Accessors(chain = true) public class AdminsProductSpuVO { @ApiModelProperty(value = "SPU 编号", required = true, example = "1") @@ -31,85 +35,4 @@ public class AdminsProductSpuVO { @ApiModelProperty(value = "排序字段", required = true, example = "10") private Integer sort; - public Integer getId() { - return id; - } - - public AdminsProductSpuVO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public AdminsProductSpuVO setName(String name) { - this.name = name; - return this; - } - - public String getSellPoint() { - return sellPoint; - } - - public AdminsProductSpuVO setSellPoint(String sellPoint) { - this.sellPoint = sellPoint; - return this; - } - - public String getDescription() { - return description; - } - - public AdminsProductSpuVO setDescription(String description) { - this.description = description; - return this; - } - - public Integer getCid() { - return cid; - } - - public AdminsProductSpuVO setCid(Integer cid) { - this.cid = cid; - return this; - } - - public List getPicUrls() { - return picUrls; - } - - public AdminsProductSpuVO setPicUrls(List picUrls) { - this.picUrls = picUrls; - return this; - } - - public Boolean getVisible() { - return visible; - } - - public AdminsProductSpuVO setVisible(Boolean visible) { - this.visible = visible; - return this; - } - - public Integer getSort() { - return sort; - } - - public AdminsProductSpuVO setSort(Integer sort) { - this.sort = sort; - return this; - } - - public Integer getQuantity() { - return quantity; - } - - public AdminsProductSpuVO setQuantity(Integer quantity) { - this.quantity = quantity; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductAttrAndValuePairVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductAttrAndValuePairVO.java index 55a59ffdc..2902980bf 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductAttrAndValuePairVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductAttrAndValuePairVO.java @@ -2,8 +2,12 @@ package cn.iocoder.mall.product.application.vo.users; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; @ApiModel(value = "商品规格属性和值对 VO") +@Data +@Accessors(chain = true) public class UsersProductAttrAndValuePairVO { @ApiModelProperty(value = "规格编号", required = true, example = "1") @@ -15,40 +19,4 @@ public class UsersProductAttrAndValuePairVO { @ApiModelProperty(value = "规格值名", required = true, example = "红色") private String attrValueName; - public Integer getAttrId() { - return attrId; - } - - public UsersProductAttrAndValuePairVO setAttrId(Integer attrId) { - this.attrId = attrId; - return this; - } - - public String getAttrName() { - return attrName; - } - - public UsersProductAttrAndValuePairVO setAttrName(String attrName) { - this.attrName = attrName; - return this; - } - - public Integer getAttrValueId() { - return attrValueId; - } - - public UsersProductAttrAndValuePairVO setAttrValueId(Integer attrValueId) { - this.attrValueId = attrValueId; - return this; - } - - public String getAttrValueName() { - return attrValueName; - } - - public UsersProductAttrAndValuePairVO setAttrValueName(String attrValueName) { - this.attrValueName = attrValueName; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductCategoryVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductCategoryVO.java index d32304b64..57b158e02 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductCategoryVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductCategoryVO.java @@ -2,8 +2,12 @@ package cn.iocoder.mall.product.application.vo.users; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; @ApiModel("商品分类(简单)") +@Data +@Accessors(chain = true) public class UsersProductCategoryVO { @ApiModelProperty(value = "分类编号", required = true, example = "1") @@ -13,28 +17,4 @@ public class UsersProductCategoryVO { @ApiModelProperty(value = "分类图片", notes = "一般情况下,只有根分类才有图片", example = "http://www.iocoder.cn/images/common/wechat_mp_2017_07_31_bak.jpg") private String picUrl; - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPicUrl() { - return picUrl; - } - - public void setPicUrl(String picUrl) { - this.picUrl = picUrl; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductSkuDetailVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductSkuDetailVO.java index b1cfc0081..338209ffc 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductSkuDetailVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductSkuDetailVO.java @@ -1,12 +1,16 @@ package cn.iocoder.mall.product.application.vo.users; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; import java.util.List; /** * 商品 Sku 明细 BO */ +@Data +@Accessors(chain = true) public class UsersProductSkuDetailVO { @ApiModelProperty(value = "sku 编号", required = true, example = "1") @@ -22,58 +26,4 @@ public class UsersProductSkuDetailVO { @ApiModelProperty(value = "库存数量", required = true, example = "100") private Integer quantity; - public Integer getId() { - return id; - } - - public UsersProductSkuDetailVO setId(Integer id) { - this.id = id; - return this; - } - - public Integer getSpuId() { - return spuId; - } - - public UsersProductSkuDetailVO setSpuId(Integer spuId) { - this.spuId = spuId; - return this; - } - - public String getPicURL() { - return picURL; - } - - public UsersProductSkuDetailVO setPicURL(String picURL) { - this.picURL = picURL; - return this; - } - - public Integer getPrice() { - return price; - } - - public UsersProductSkuDetailVO setPrice(Integer price) { - this.price = price; - return this; - } - - public Integer getQuantity() { - return quantity; - } - - public UsersProductSkuDetailVO setQuantity(Integer quantity) { - this.quantity = quantity; - return this; - } - - public List getAttrs() { - return attrs; - } - - public UsersProductSkuDetailVO setAttrs(List attrs) { - this.attrs = attrs; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductSpuDetailVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductSpuDetailVO.java index d58ea0b77..1d56f8029 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductSpuDetailVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductSpuDetailVO.java @@ -2,10 +2,14 @@ package cn.iocoder.mall.product.application.vo.users; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; import java.util.List; @ApiModel(value = "商品 SPU 详细 VO", description = "包括 SKU 信息 VO") +@Data +@Accessors(chain = true) public class UsersProductSpuDetailVO { @ApiModelProperty(value = "SPU 编号", required = true, example = "1") @@ -30,66 +34,4 @@ public class UsersProductSpuDetailVO { */ private List skus; - public Integer getId() { - return id; - } - - public UsersProductSpuDetailVO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public UsersProductSpuDetailVO setName(String name) { - this.name = name; - return this; - } - - public String getSellPoint() { - return sellPoint; - } - - public UsersProductSpuDetailVO setSellPoint(String sellPoint) { - this.sellPoint = sellPoint; - return this; - } - - public String getDescription() { - return description; - } - - public UsersProductSpuDetailVO setDescription(String description) { - this.description = description; - return this; - } - - public Integer getCid() { - return cid; - } - - public UsersProductSpuDetailVO setCid(Integer cid) { - this.cid = cid; - return this; - } - - public List getPicUrls() { - return picUrls; - } - - public UsersProductSpuDetailVO setPicUrls(List picUrls) { - this.picUrls = picUrls; - return this; - } - - public List getSkus() { - return skus; - } - - public UsersProductSpuDetailVO setSkus(List skus) { - this.skus = skus; - return this; - } -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductSpuPageVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductSpuPageVO.java index 55c801cc1..f2adb5f76 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductSpuPageVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductSpuPageVO.java @@ -2,10 +2,14 @@ package cn.iocoder.mall.product.application.vo.users; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; import java.util.List; @ApiModel("商品 SPU 分页 VO") +@Data +@Accessors(chain = true) public class UsersProductSpuPageVO { @ApiModelProperty(value = "spu 数组", required = true) @@ -13,22 +17,4 @@ public class UsersProductSpuPageVO { @ApiModelProperty(value = "总数", required = true) private Integer count; - public List getSpus() { - return spus; - } - - public UsersProductSpuPageVO setSpus(List spus) { - this.spus = spus; - return this; - } - - public Integer getCount() { - return count; - } - - public UsersProductSpuPageVO setCount(Integer count) { - this.count = count; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductSpuVO.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductSpuVO.java index 5f7e5d1fd..1236a0e12 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductSpuVO.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/users/UsersProductSpuVO.java @@ -2,10 +2,14 @@ package cn.iocoder.mall.product.application.vo.users; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; import java.util.List; @ApiModel(value = "商品 SPU VO", description = "不包括 SKU 信息 VO") +@Data +@Accessors(chain = true) public class UsersProductSpuVO { @ApiModelProperty(value = "SPU 编号", required = true, example = "1") @@ -35,66 +39,4 @@ public class UsersProductSpuVO { */ private Integer quantity; - public Integer getId() { - return id; - } - - public UsersProductSpuVO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public UsersProductSpuVO setName(String name) { - this.name = name; - return this; - } - - public String getSellPoint() { - return sellPoint; - } - - public UsersProductSpuVO setSellPoint(String sellPoint) { - this.sellPoint = sellPoint; - return this; - } - - public Integer getCid() { - return cid; - } - - public UsersProductSpuVO setCid(Integer cid) { - this.cid = cid; - return this; - } - - public List getPicUrls() { - return picUrls; - } - - public UsersProductSpuVO setPicUrls(List picUrls) { - this.picUrls = picUrls; - return this; - } - - public Integer getPrice() { - return price; - } - - public UsersProductSpuVO setPrice(Integer price) { - this.price = price; - return this; - } - - public Integer getQuantity() { - return quantity; - } - - public UsersProductSpuVO setQuantity(Integer quantity) { - this.quantity = quantity; - return this; - } -} \ No newline at end of file +} diff --git a/product/product-service-api/pom.xml b/product/product-service-api/pom.xml index 8a30eb271..03c2efe52 100644 --- a/product/product-service-api/pom.xml +++ b/product/product-service-api/pom.xml @@ -19,8 +19,8 @@ - org.hibernate.validator - hibernate-validator + javax.validation + validation-api @@ -31,6 +31,10 @@ org.mapstruct mapstruct-jdk8 + + org.projectlombok + lombok + diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrAndValuePairBO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrAndValuePairBO.java index dfea5d9f5..3faa888aa 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrAndValuePairBO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrAndValuePairBO.java @@ -1,10 +1,15 @@ package cn.iocoder.mall.product.api.bo; +import lombok.Data; +import lombok.experimental.Accessors; + import java.io.Serializable; /** * 商品规格明细 BO */ +@Data +@Accessors(chain = true) public class ProductAttrAndValuePairBO implements Serializable { /** @@ -24,40 +29,4 @@ public class ProductAttrAndValuePairBO implements Serializable { */ private String attrValueName; - public Integer getAttrId() { - return attrId; - } - - public ProductAttrAndValuePairBO setAttrId(Integer attrId) { - this.attrId = attrId; - return this; - } - - public String getAttrName() { - return attrName; - } - - public ProductAttrAndValuePairBO setAttrName(String attrName) { - this.attrName = attrName; - return this; - } - - public Integer getAttrValueId() { - return attrValueId; - } - - public ProductAttrAndValuePairBO setAttrValueId(Integer attrValueId) { - this.attrValueId = attrValueId; - return this; - } - - public String getAttrValueName() { - return attrValueName; - } - - public ProductAttrAndValuePairBO setAttrValueName(String attrValueName) { - this.attrValueName = attrValueName; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrBO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrBO.java index 2da299c38..cbb535142 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrBO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrBO.java @@ -1,11 +1,16 @@ package cn.iocoder.mall.product.api.bo; +import lombok.Data; +import lombok.experimental.Accessors; + import java.io.Serializable; import java.util.Date; /** * 商品规格 VO */ +@Data +@Accessors(chain = true) public class ProductAttrBO implements Serializable { /** @@ -25,39 +30,4 @@ public class ProductAttrBO implements Serializable { */ private Date createTime; - public Integer getId() { - return id; - } - - public ProductAttrBO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public ProductAttrBO setName(String name) { - this.name = name; - return this; - } - - public Integer getStatus() { - return status; - } - - public ProductAttrBO setStatus(Integer status) { - this.status = status; - return this; - } - - public Date getCreateTime() { - return createTime; - } - - public ProductAttrBO setCreateTime(Date createTime) { - this.createTime = createTime; - return this; - } -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrDetailBO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrDetailBO.java index 6a3c5edf3..0911e4d0e 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrDetailBO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrDetailBO.java @@ -1,5 +1,8 @@ package cn.iocoder.mall.product.api.bo; +import lombok.Data; +import lombok.experimental.Accessors; + import java.io.Serializable; import java.util.Date; import java.util.List; @@ -7,6 +10,8 @@ import java.util.List; /** * 商品规格明细 VO */ +@Data +@Accessors(chain = true) public class ProductAttrDetailBO implements Serializable { /** @@ -30,48 +35,4 @@ public class ProductAttrDetailBO implements Serializable { */ private List values; - public Integer getId() { - return id; - } - - public ProductAttrDetailBO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public ProductAttrDetailBO setName(String name) { - this.name = name; - return this; - } - - public Integer getStatus() { - return status; - } - - public ProductAttrDetailBO setStatus(Integer status) { - this.status = status; - return this; - } - - public Date getCreateTime() { - return createTime; - } - - public ProductAttrDetailBO setCreateTime(Date createTime) { - this.createTime = createTime; - return this; - } - - public List getValues() { - return values; - } - - public ProductAttrDetailBO setValues(List values) { - this.values = values; - return this; - } -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrPageBO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrPageBO.java index bf6176f5c..f44cce203 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrPageBO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrPageBO.java @@ -1,11 +1,16 @@ package cn.iocoder.mall.product.api.bo; +import lombok.Data; +import lombok.experimental.Accessors; + import java.io.Serializable; import java.util.List; /** * 商品规格明细分页 BO */ +@Data +@Accessors(chain = true) public class ProductAttrPageBO implements Serializable { /** @@ -17,22 +22,4 @@ public class ProductAttrPageBO implements Serializable { */ private Integer count; - public List getAttrs() { - return attrs; - } - - public ProductAttrPageBO setAttrs(List attrs) { - this.attrs = attrs; - return this; - } - - public Integer getCount() { - return count; - } - - public ProductAttrPageBO setCount(Integer count) { - this.count = count; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrSimpleBO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrSimpleBO.java index 9eda2af66..2337c7a90 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrSimpleBO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrSimpleBO.java @@ -1,11 +1,16 @@ package cn.iocoder.mall.product.api.bo; +import lombok.Data; +import lombok.experimental.Accessors; + import java.io.Serializable; import java.util.List; /** * 商品规格精简 VO */ +@Data +@Accessors(chain = true) public class ProductAttrSimpleBO implements Serializable { /** @@ -21,31 +26,4 @@ public class ProductAttrSimpleBO implements Serializable { */ private List values; - public Integer getId() { - return id; - } - - public ProductAttrSimpleBO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public ProductAttrSimpleBO setName(String name) { - this.name = name; - return this; - } - - public List getValues() { - return values; - } - - public ProductAttrSimpleBO setValues(List values) { - this.values = values; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrValueBO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrValueBO.java index 3fe44272e..3c6874985 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrValueBO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrValueBO.java @@ -1,11 +1,16 @@ package cn.iocoder.mall.product.api.bo; +import lombok.Data; +import lombok.experimental.Accessors; + import java.io.Serializable; import java.util.Date; /** * 商品规格值 VO */ +@Data +@Accessors(chain = true) public class ProductAttrValueBO implements Serializable { /** @@ -29,48 +34,4 @@ public class ProductAttrValueBO implements Serializable { */ private Date createTime; - public Integer getId() { - return id; - } - - public ProductAttrValueBO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public ProductAttrValueBO setName(String name) { - this.name = name; - return this; - } - - public Integer getStatus() { - return status; - } - - public ProductAttrValueBO setStatus(Integer status) { - this.status = status; - return this; - } - - public Date getCreateTime() { - return createTime; - } - - public ProductAttrValueBO setCreateTime(Date createTime) { - this.createTime = createTime; - return this; - } - - public Integer getAttrId() { - return attrId; - } - - public ProductAttrValueBO setAttrId(Integer attrId) { - this.attrId = attrId; - return this; - } -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrValueDetailBO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrValueDetailBO.java index c70690e99..ffb9f3ade 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrValueDetailBO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrValueDetailBO.java @@ -1,11 +1,16 @@ package cn.iocoder.mall.product.api.bo; +import lombok.Data; +import lombok.experimental.Accessors; + import java.io.Serializable; import java.util.Date; /** * 商品规格值 VO */ +@Data +@Accessors(chain = true) public class ProductAttrValueDetailBO implements Serializable { /** @@ -25,39 +30,4 @@ public class ProductAttrValueDetailBO implements Serializable { */ private Date createTime; - public Integer getId() { - return id; - } - - public ProductAttrValueDetailBO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public ProductAttrValueDetailBO setName(String name) { - this.name = name; - return this; - } - - public Integer getStatus() { - return status; - } - - public ProductAttrValueDetailBO setStatus(Integer status) { - this.status = status; - return this; - } - - public Date getCreateTime() { - return createTime; - } - - public ProductAttrValueDetailBO setCreateTime(Date createTime) { - this.createTime = createTime; - return this; - } -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrValueSimpleBO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrValueSimpleBO.java index 7d1bb0ec9..f2380b3ed 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrValueSimpleBO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductAttrValueSimpleBO.java @@ -1,10 +1,15 @@ package cn.iocoder.mall.product.api.bo; +import lombok.Data; +import lombok.experimental.Accessors; + import java.io.Serializable; /** * 商品规格值 VO */ +@Data +@Accessors(chain = true) public class ProductAttrValueSimpleBO implements Serializable { /** @@ -16,22 +21,4 @@ public class ProductAttrValueSimpleBO implements Serializable { */ private String name; - public Integer getId() { - return id; - } - - public ProductAttrValueSimpleBO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public ProductAttrValueSimpleBO setName(String name) { - this.name = name; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductCategoryBO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductCategoryBO.java index 6450145cc..b2cefd507 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductCategoryBO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductCategoryBO.java @@ -1,11 +1,16 @@ package cn.iocoder.mall.product.api.bo; +import lombok.Data; +import lombok.experimental.Accessors; + import java.io.Serializable; import java.util.Date; /** * 商品分类 BO */ +@Data +@Accessors(chain = true) public class ProductCategoryBO implements Serializable { /** @@ -46,71 +51,4 @@ public class ProductCategoryBO implements Serializable { */ private Date createTime; - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getPid() { - return pid; - } - - public void setPid(Integer pid) { - this.pid = pid; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPicUrl() { - return picUrl; - } - - public void setPicUrl(String picUrl) { - this.picUrl = picUrl; - } - - public Integer getSort() { - return sort; - } - - public void setSort(Integer sort) { - this.sort = sort; - } - - public String getDescription() { - return description; - } - - public ProductCategoryBO setDescription(String description) { - this.description = description; - return this; - } - - public Integer getStatus() { - return status; - } - - public ProductCategoryBO setStatus(Integer status) { - this.status = status; - return this; - } - - public Date getCreateTime() { - return createTime; - } - - public ProductCategoryBO setCreateTime(Date createTime) { - this.createTime = createTime; - return this; - } - } diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSkuBO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSkuBO.java index 7ef2ea4ff..e26e85d44 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSkuBO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSkuBO.java @@ -1,17 +1,20 @@ package cn.iocoder.mall.product.api.bo; +import lombok.Data; +import lombok.experimental.Accessors; + import java.io.Serializable; +/** + * 商品 SKU BOA + */ +@Data +@Accessors(chain = true) public class ProductSkuBO implements Serializable { + /** + * SKU 编号 + */ private Integer id; - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSkuDetailBO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSkuDetailBO.java index e6e9d5ab4..7864a9efc 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSkuDetailBO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSkuDetailBO.java @@ -1,11 +1,16 @@ package cn.iocoder.mall.product.api.bo; +import lombok.Data; +import lombok.experimental.Accessors; + import java.io.Serializable; import java.util.List; /** * 商品 Sku 明细 BO */ +@Data +@Accessors(chain = true) public class ProductSkuDetailBO implements Serializable { /** @@ -33,59 +38,4 @@ public class ProductSkuDetailBO implements Serializable { */ private Integer quantity; - - public Integer getId() { - return id; - } - - public ProductSkuDetailBO setId(Integer id) { - this.id = id; - return this; - } - - public Integer getSpuId() { - return spuId; - } - - public ProductSkuDetailBO setSpuId(Integer spuId) { - this.spuId = spuId; - return this; - } - - public String getPicURL() { - return picURL; - } - - public ProductSkuDetailBO setPicURL(String picURL) { - this.picURL = picURL; - return this; - } - - public List getAttrs() { - return attrs; - } - - public ProductSkuDetailBO setAttrs(List attrs) { - this.attrs = attrs; - return this; - } - - public Integer getPrice() { - return price; - } - - public ProductSkuDetailBO setPrice(Integer price) { - this.price = price; - return this; - } - - public Integer getQuantity() { - return quantity; - } - - public ProductSkuDetailBO setQuantity(Integer quantity) { - this.quantity = quantity; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSpuBO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSpuBO.java index c40702e1a..8f442e4d0 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSpuBO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSpuBO.java @@ -1,8 +1,16 @@ package cn.iocoder.mall.product.api.bo; +import lombok.Data; +import lombok.experimental.Accessors; + import java.io.Serializable; import java.util.List; +/** + * 商品 SPU BO + */ +@Data +@Accessors(chain = true) public class ProductSpuBO implements Serializable { /** @@ -63,93 +71,4 @@ public class ProductSpuBO implements Serializable { */ private Integer quantity; - public Integer getId() { - return id; - } - - public ProductSpuBO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public ProductSpuBO setName(String name) { - this.name = name; - return this; - } - - public String getSellPoint() { - return sellPoint; - } - - public ProductSpuBO setSellPoint(String sellPoint) { - this.sellPoint = sellPoint; - return this; - } - - public String getDescription() { - return description; - } - - public ProductSpuBO setDescription(String description) { - this.description = description; - return this; - } - - public Integer getCid() { - return cid; - } - - public ProductSpuBO setCid(Integer cid) { - this.cid = cid; - return this; - } - - public List getPicUrls() { - return picUrls; - } - - public ProductSpuBO setPicUrls(List picUrls) { - this.picUrls = picUrls; - return this; - } - - public Boolean getVisible() { - return visible; - } - - public ProductSpuBO setVisible(Boolean visible) { - this.visible = visible; - return this; - } - - public Integer getSort() { - return sort; - } - - public ProductSpuBO setSort(Integer sort) { - this.sort = sort; - return this; - } - - public Integer getPrice() { - return price; - } - - public ProductSpuBO setPrice(Integer price) { - this.price = price; - return this; - } - - public Integer getQuantity() { - return quantity; - } - - public ProductSpuBO setQuantity(Integer quantity) { - this.quantity = quantity; - return this; - } -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSpuDetailBO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSpuDetailBO.java index 2ad313429..c97ed4282 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSpuDetailBO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSpuDetailBO.java @@ -1,11 +1,16 @@ package cn.iocoder.mall.product.api.bo; +import lombok.Data; +import lombok.experimental.Accessors; + import java.io.Serializable; import java.util.List; /** * 商品 Spu 明细 BO(包括 Sku 明细) */ +@Data +@Accessors(chain = true) public class ProductSpuDetailBO implements Serializable { /** @@ -59,85 +64,4 @@ public class ProductSpuDetailBO implements Serializable { */ private List skus; - public Integer getId() { - return id; - } - - public ProductSpuDetailBO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public ProductSpuDetailBO setName(String name) { - this.name = name; - return this; - } - - public String getSellPoint() { - return sellPoint; - } - - public ProductSpuDetailBO setSellPoint(String sellPoint) { - this.sellPoint = sellPoint; - return this; - } - - public String getDescription() { - return description; - } - - public ProductSpuDetailBO setDescription(String description) { - this.description = description; - return this; - } - - public Integer getCid() { - return cid; - } - - public ProductSpuDetailBO setCid(Integer cid) { - this.cid = cid; - return this; - } - - public List getPicUrls() { - return picUrls; - } - - public ProductSpuDetailBO setPicUrls(List picUrls) { - this.picUrls = picUrls; - return this; - } - - public Boolean getVisible() { - return visible; - } - - public ProductSpuDetailBO setVisible(Boolean visible) { - this.visible = visible; - return this; - } - - public Integer getSort() { - return sort; - } - - public ProductSpuDetailBO setSort(Integer sort) { - this.sort = sort; - return this; - } - - public List getSkus() { - return skus; - } - - public ProductSpuDetailBO setSkus(List skus) { - this.skus = skus; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSpuPageBO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSpuPageBO.java index 0d6093743..a32ef38ef 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSpuPageBO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductSpuPageBO.java @@ -1,8 +1,16 @@ package cn.iocoder.mall.product.api.bo; +import lombok.Data; +import lombok.experimental.Accessors; + import java.io.Serializable; import java.util.List; +/** + * 商品 SPU 分页 BO + */ +@Data +@Accessors(chain = true) public class ProductSpuPageBO implements Serializable { /** @@ -14,22 +22,4 @@ public class ProductSpuPageBO implements Serializable { */ private Integer count; - public List getSpus() { - return spus; - } - - public ProductSpuPageBO setSpus(List spus) { - this.spus = spus; - return this; - } - - public Integer getCount() { - return count; - } - - public ProductSpuPageBO setCount(Integer count) { - this.count = count; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrAddDTO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrAddDTO.java index 1990facde..9a86e8a7d 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrAddDTO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrAddDTO.java @@ -1,10 +1,15 @@ package cn.iocoder.mall.product.api.dto; +import lombok.Data; +import lombok.experimental.Accessors; + import javax.validation.constraints.NotEmpty; /** * Product 规格添加 DTO */ +@Data +@Accessors(chain = true) public class ProductAttrAddDTO { /** @@ -13,13 +18,4 @@ public class ProductAttrAddDTO { @NotEmpty(message = "规格名不能为空") private String name; - public String getName() { - return name; - } - - public ProductAttrAddDTO setName(String name) { - this.name = name; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrPageDTO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrPageDTO.java index 20319219d..ef27ada19 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrPageDTO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrPageDTO.java @@ -1,10 +1,15 @@ package cn.iocoder.mall.product.api.dto; +import lombok.Data; +import lombok.experimental.Accessors; + import javax.validation.constraints.NotNull; /** * 商品规格分页 DTO */ +@Data +@Accessors(chain = true) public class ProductAttrPageDTO { private String name; @@ -14,31 +19,4 @@ public class ProductAttrPageDTO { @NotNull(message = "每页条数不能为空") private Integer pageSize; - public String getName() { - return name; - } - - public ProductAttrPageDTO setName(String name) { - this.name = name; - return this; - } - - public Integer getPageNo() { - return pageNo; - } - - public ProductAttrPageDTO setPageNo(Integer pageNo) { - this.pageNo = pageNo; - return this; - } - - public Integer getPageSize() { - return pageSize; - } - - public ProductAttrPageDTO setPageSize(Integer pageSize) { - this.pageSize = pageSize; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrUpdateDTO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrUpdateDTO.java index 70ed8c3ef..70eca60ba 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrUpdateDTO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrUpdateDTO.java @@ -1,11 +1,16 @@ package cn.iocoder.mall.product.api.dto; +import lombok.Data; +import lombok.experimental.Accessors; + import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; /** * Product 规格修改 DTO */ +@Data +@Accessors(chain = true) public class ProductAttrUpdateDTO { /** @@ -19,22 +24,5 @@ public class ProductAttrUpdateDTO { @NotEmpty(message = "规格名不能为空") private String name; - public String getName() { - return name; - } - public ProductAttrUpdateDTO setName(String name) { - this.name = name; - return this; - } - - public Integer getId() { - return id; - } - - public ProductAttrUpdateDTO setId(Integer id) { - this.id = id; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrValueAddDTO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrValueAddDTO.java index 1d11c4f18..630aa20b1 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrValueAddDTO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrValueAddDTO.java @@ -1,11 +1,16 @@ package cn.iocoder.mall.product.api.dto; +import lombok.Data; +import lombok.experimental.Accessors; + import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; /** * Product 规格值添加 DTO */ +@Data +@Accessors(chain = true) public class ProductAttrValueAddDTO { /** @@ -19,22 +24,4 @@ public class ProductAttrValueAddDTO { @NotEmpty(message = "规格值名不能为空") private String name; - public Integer getAttrId() { - return attrId; - } - - public ProductAttrValueAddDTO setAttrId(Integer attrId) { - this.attrId = attrId; - return this; - } - - public String getName() { - return name; - } - - public ProductAttrValueAddDTO setName(String name) { - this.name = name; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrValueUpdateDTO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrValueUpdateDTO.java index 633d9f905..aef865ee3 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrValueUpdateDTO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductAttrValueUpdateDTO.java @@ -1,5 +1,8 @@ package cn.iocoder.mall.product.api.dto; +import lombok.Data; +import lombok.experimental.Accessors; + import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; @@ -8,6 +11,8 @@ import javax.validation.constraints.NotNull; * * 注意,不允许修改所属规格 */ +@Data +@Accessors(chain = true) public class ProductAttrValueUpdateDTO { /** @@ -21,22 +26,4 @@ public class ProductAttrValueUpdateDTO { @NotEmpty(message = "规格名不能为空") private String name; - public String getName() { - return name; - } - - public ProductAttrValueUpdateDTO setName(String name) { - this.name = name; - return this; - } - - public Integer getId() { - return id; - } - - public ProductAttrValueUpdateDTO setId(Integer id) { - this.id = id; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductCategoryAddDTO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductCategoryAddDTO.java index 4b839944c..30eeeca5f 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductCategoryAddDTO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductCategoryAddDTO.java @@ -1,10 +1,15 @@ package cn.iocoder.mall.product.api.dto; +import lombok.Data; +import lombok.experimental.Accessors; + import javax.validation.constraints.NotNull; /** * 商品分类添加 DTO */ +@Data +@Accessors(chain = true) public class ProductCategoryAddDTO { /** @@ -33,49 +38,4 @@ public class ProductCategoryAddDTO { @NotNull(message = "排序值不能为空") private Integer sort; - public Integer getPid() { - return pid; - } - - public ProductCategoryAddDTO setPid(Integer pid) { - this.pid = pid; - return this; - } - - public String getName() { - return name; - } - - public ProductCategoryAddDTO setName(String name) { - this.name = name; - return this; - } - - public String getDescription() { - return description; - } - - public ProductCategoryAddDTO setDescription(String description) { - this.description = description; - return this; - } - - public String getPicUrl() { - return picUrl; - } - - public ProductCategoryAddDTO setPicUrl(String picUrl) { - this.picUrl = picUrl; - return this; - } - - public Integer getSort() { - return sort; - } - - public ProductCategoryAddDTO setSort(Integer sort) { - this.sort = sort; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductCategoryUpdateDTO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductCategoryUpdateDTO.java index ed9737310..0f6e28d60 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductCategoryUpdateDTO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductCategoryUpdateDTO.java @@ -1,10 +1,15 @@ package cn.iocoder.mall.product.api.dto; +import lombok.Data; +import lombok.experimental.Accessors; + import javax.validation.constraints.NotNull; /** * 商品分类更新 DTO */ +@Data +@Accessors(chain = true) public class ProductCategoryUpdateDTO { /** @@ -38,57 +43,4 @@ public class ProductCategoryUpdateDTO { @NotNull(message = "排序值不能为空") private Integer sort; - public Integer getPid() { - return pid; - } - - public ProductCategoryUpdateDTO setPid(Integer pid) { - this.pid = pid; - return this; - } - - public String getName() { - return name; - } - - public ProductCategoryUpdateDTO setName(String name) { - this.name = name; - return this; - } - - public String getDescription() { - return description; - } - - public ProductCategoryUpdateDTO setDescription(String description) { - this.description = description; - return this; - } - - public String getPicUrl() { - return picUrl; - } - - public ProductCategoryUpdateDTO setPicUrl(String picUrl) { - this.picUrl = picUrl; - return this; - } - - public Integer getSort() { - return sort; - } - - public ProductCategoryUpdateDTO setSort(Integer sort) { - this.sort = sort; - return this; - } - - public Integer getId() { - return id; - } - - public ProductCategoryUpdateDTO setId(Integer id) { - this.id = id; - return this; - } -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductSkuAddOrUpdateDTO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductSkuAddOrUpdateDTO.java index 3c6bbffc8..a39a1f9b6 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductSkuAddOrUpdateDTO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductSkuAddOrUpdateDTO.java @@ -1,5 +1,8 @@ package cn.iocoder.mall.product.api.dto; +import lombok.Data; +import lombok.experimental.Accessors; + import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; import java.util.List; @@ -7,6 +10,8 @@ import java.util.List; /** * 商品 Sku 添加 DTO */ +@Data +@Accessors(chain = true) public class ProductSkuAddOrUpdateDTO { /** @@ -27,31 +32,4 @@ public class ProductSkuAddOrUpdateDTO { @Min(value = 1L, message = "最小库存为 1") private Integer quantity; - public List getAttrs() { - return attrs; - } - - public ProductSkuAddOrUpdateDTO setAttrs(List attrs) { - this.attrs = attrs; - return this; - } - - public Integer getPrice() { - return price; - } - - public ProductSkuAddOrUpdateDTO setPrice(Integer price) { - this.price = price; - return this; - } - - public Integer getQuantity() { - return quantity; - } - - public ProductSkuAddOrUpdateDTO setQuantity(Integer quantity) { - this.quantity = quantity; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductSpuAddDTO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductSpuAddDTO.java index 86c650db1..b2150b25e 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductSpuAddDTO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductSpuAddDTO.java @@ -1,5 +1,8 @@ package cn.iocoder.mall.product.api.dto; +import lombok.Data; +import lombok.experimental.Accessors; + import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.List; @@ -7,6 +10,8 @@ import java.util.List; /** * 商品 SPU + SKU 添加 DTO */ +@Data +@Accessors(chain = true) public class ProductSpuAddDTO { // ========== 基本信息 ========= @@ -54,67 +59,4 @@ public class ProductSpuAddDTO { @NotNull(message = "SKU 不能为空") private List skus; - public String getName() { - return name; - } - - public ProductSpuAddDTO setName(String name) { - this.name = name; - return this; - } - - public String getSellPoint() { - return sellPoint; - } - - public ProductSpuAddDTO setSellPoint(String sellPoint) { - this.sellPoint = sellPoint; - return this; - } - - public String getDescription() { - return description; - } - - public ProductSpuAddDTO setDescription(String description) { - this.description = description; - return this; - } - - public Integer getCid() { - return cid; - } - - public ProductSpuAddDTO setCid(Integer cid) { - this.cid = cid; - return this; - } - - public List getPicUrls() { - return picUrls; - } - - public ProductSpuAddDTO setPicUrls(List picUrls) { - this.picUrls = picUrls; - return this; - } - - public Boolean getVisible() { - return visible; - } - - public ProductSpuAddDTO setVisible(Boolean visible) { - this.visible = visible; - return this; - } - - public List getSkus() { - return skus; - } - - public ProductSpuAddDTO setSkus(List skus) { - this.skus = skus; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductSpuPageDTO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductSpuPageDTO.java index a218e56b5..604841b2d 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductSpuPageDTO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductSpuPageDTO.java @@ -1,10 +1,15 @@ package cn.iocoder.mall.product.api.dto; +import lombok.Data; +import lombok.experimental.Accessors; + import javax.validation.constraints.NotNull; /** * 商品 Spu 分页 DTO */ +@Data +@Accessors(chain = true) public class ProductSpuPageDTO { /** @@ -27,49 +32,4 @@ public class ProductSpuPageDTO { @NotNull(message = "每页条数不能为空") private Integer pageSize; - public String getName() { - return name; - } - - public ProductSpuPageDTO setName(String name) { - this.name = name; - return this; - } - - public Integer getPageNo() { - return pageNo; - } - - public ProductSpuPageDTO setPageNo(Integer pageNo) { - this.pageNo = pageNo; - return this; - } - - public Integer getPageSize() { - return pageSize; - } - - public ProductSpuPageDTO setPageSize(Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - public Integer getCid() { - return cid; - } - - public ProductSpuPageDTO setCid(Integer cid) { - this.cid = cid; - return this; - } - - public Boolean getVisible() { - return visible; - } - - public ProductSpuPageDTO setVisible(Boolean visible) { - this.visible = visible; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductSpuUpdateDTO.java b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductSpuUpdateDTO.java index 7847ed61b..5b4753491 100644 --- a/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductSpuUpdateDTO.java +++ b/product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductSpuUpdateDTO.java @@ -1,5 +1,8 @@ package cn.iocoder.mall.product.api.dto; +import lombok.Data; +import lombok.experimental.Accessors; + import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.List; @@ -7,6 +10,8 @@ import java.util.List; /** * 商品 SPU + SKU 更新 DTO */ +@Data +@Accessors(chain = true) public class ProductSpuUpdateDTO { /** @@ -60,75 +65,4 @@ public class ProductSpuUpdateDTO { @NotNull(message = "SKU 不能为空") private List skus; - public String getName() { - return name; - } - - public ProductSpuUpdateDTO setName(String name) { - this.name = name; - return this; - } - - public String getSellPoint() { - return sellPoint; - } - - public ProductSpuUpdateDTO setSellPoint(String sellPoint) { - this.sellPoint = sellPoint; - return this; - } - - public String getDescription() { - return description; - } - - public ProductSpuUpdateDTO setDescription(String description) { - this.description = description; - return this; - } - - public Integer getCid() { - return cid; - } - - public ProductSpuUpdateDTO setCid(Integer cid) { - this.cid = cid; - return this; - } - - public List getPicUrls() { - return picUrls; - } - - public ProductSpuUpdateDTO setPicUrls(List picUrls) { - this.picUrls = picUrls; - return this; - } - - public Boolean getVisible() { - return visible; - } - - public ProductSpuUpdateDTO setVisible(Boolean visible) { - this.visible = visible; - return this; - } - - public List getSkus() { - return skus; - } - - public ProductSpuUpdateDTO setSkus(List skus) { - this.skus = skus; - return this; - } - - public Integer getId() { - return id; - } - - public ProductSpuUpdateDTO setId(Integer id) { - this.id = id; - return this; - } -} \ No newline at end of file +} diff --git a/product/product-service-impl/pom.xml b/product/product-service-impl/pom.xml index 61ec40dda..1855c5a9b 100644 --- a/product/product-service-impl/pom.xml +++ b/product/product-service-impl/pom.xml @@ -11,12 +11,7 @@ product-service-impl - - 1.3.0.Final - - - cn.iocoder.mall product-service-api diff --git a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductAttrDO.java b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductAttrDO.java index 4d42aa986..4499806bf 100644 --- a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductAttrDO.java +++ b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductAttrDO.java @@ -1,10 +1,14 @@ package cn.iocoder.mall.product.dataobject; import cn.iocoder.common.framework.dataobject.DeletableDO; +import lombok.Data; +import lombok.experimental.Accessors; /** * Product 规格 */ +@Data +@Accessors(chain = true) public class ProductAttrDO extends DeletableDO { /** @@ -23,31 +27,4 @@ public class ProductAttrDO extends DeletableDO { */ private Integer status; - public Integer getId() { - return id; - } - - public ProductAttrDO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public ProductAttrDO setName(String name) { - this.name = name; - return this; - } - - public Integer getStatus() { - return status; - } - - public ProductAttrDO setStatus(Integer status) { - this.status = status; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductAttrValueDO.java b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductAttrValueDO.java index ba9f0a747..ccfe7aa35 100644 --- a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductAttrValueDO.java +++ b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductAttrValueDO.java @@ -1,10 +1,14 @@ package cn.iocoder.mall.product.dataobject; import cn.iocoder.common.framework.dataobject.DeletableDO; +import lombok.Data; +import lombok.experimental.Accessors; /** * Product 规格值 */ +@Data +@Accessors(chain = true) public class ProductAttrValueDO extends DeletableDO { /** @@ -27,40 +31,4 @@ public class ProductAttrValueDO extends DeletableDO { */ private Integer status; - public Integer getId() { - return id; - } - - public ProductAttrValueDO setId(Integer id) { - this.id = id; - return this; - } - - public Integer getAttrId() { - return attrId; - } - - public ProductAttrValueDO setAttrId(Integer attrId) { - this.attrId = attrId; - return this; - } - - public String getName() { - return name; - } - - public ProductAttrValueDO setName(String name) { - this.name = name; - return this; - } - - public Integer getStatus() { - return status; - } - - public ProductAttrValueDO setStatus(Integer status) { - this.status = status; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductCategoryDO.java b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductCategoryDO.java index c31a53254..aa6489612 100644 --- a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductCategoryDO.java +++ b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductCategoryDO.java @@ -1,10 +1,14 @@ package cn.iocoder.mall.product.dataobject; import cn.iocoder.common.framework.dataobject.DeletableDO; +import lombok.Data; +import lombok.experimental.Accessors; /** * 商品分类 */ +@Data +@Accessors(chain = true) public class ProductCategoryDO extends DeletableDO { /** @@ -41,66 +45,4 @@ public class ProductCategoryDO extends DeletableDO { */ private Integer status; - public Integer getId() { - return id; - } - - public ProductCategoryDO setId(Integer id) { - this.id = id; - return this; - } - - public Integer getPid() { - return pid; - } - - public ProductCategoryDO setPid(Integer pid) { - this.pid = pid; - return this; - } - - public String getName() { - return name; - } - - public ProductCategoryDO setName(String name) { - this.name = name; - return this; - } - - public String getDescription() { - return description; - } - - public ProductCategoryDO setDescription(String description) { - this.description = description; - return this; - } - - public String getPicUrl() { - return picUrl; - } - - public ProductCategoryDO setPicUrl(String picUrl) { - this.picUrl = picUrl; - return this; - } - - public Integer getSort() { - return sort; - } - - public ProductCategoryDO setSort(Integer sort) { - this.sort = sort; - return this; - } - - public Integer getStatus() { - return status; - } - - public ProductCategoryDO setStatus(Integer status) { - this.status = status; - return this; - } -} \ No newline at end of file +} diff --git a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductSkuDO.java b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductSkuDO.java index 60543167d..2edbb11e9 100644 --- a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductSkuDO.java +++ b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductSkuDO.java @@ -1,10 +1,14 @@ package cn.iocoder.mall.product.dataobject; import cn.iocoder.common.framework.dataobject.DeletableDO; +import lombok.Data; +import lombok.experimental.Accessors; /** * 商品 SKU */ +@Data +@Accessors(chain = true) public class ProductSkuDO extends DeletableDO { /** @@ -52,68 +56,4 @@ public class ProductSkuDO extends DeletableDO { // */ // private Integer soldNum; - - public Integer getId() { - return id; - } - - public ProductSkuDO setId(Integer id) { - this.id = id; - return this; - } - - public Integer getSpuId() { - return spuId; - } - - public ProductSkuDO setSpuId(Integer spuId) { - this.spuId = spuId; - return this; - } - - public Integer getStatus() { - return status; - } - - public ProductSkuDO setStatus(Integer status) { - this.status = status; - return this; - } - - public String getPicUrl() { - return picUrl; - } - - public ProductSkuDO setPicUrl(String picUrl) { - this.picUrl = picUrl; - return this; - } - - public String getAttrs() { - return attrs; - } - - public ProductSkuDO setAttrs(String attrs) { - this.attrs = attrs; - return this; - } - - public Integer getPrice() { - return price; - } - - public ProductSkuDO setPrice(Integer price) { - this.price = price; - return this; - } - - public Integer getQuantity() { - return quantity; - } - - public ProductSkuDO setQuantity(Integer quantity) { - this.quantity = quantity; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductSpuDO.java b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductSpuDO.java index 073e6168d..25fa9774c 100644 --- a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductSpuDO.java +++ b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductSpuDO.java @@ -1,10 +1,14 @@ package cn.iocoder.mall.product.dataobject; import cn.iocoder.common.framework.dataobject.DeletableDO; +import lombok.Data; +import lombok.experimental.Accessors; /** * 商品 SPU */ +@Data +@Accessors(chain = true) public class ProductSpuDO extends DeletableDO { /** @@ -69,94 +73,4 @@ public class ProductSpuDO extends DeletableDO { */ private Integer quantity; - public Integer getId() { - return id; - } - - public ProductSpuDO setId(Integer id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public ProductSpuDO setName(String name) { - this.name = name; - return this; - } - - public String getSellPoint() { - return sellPoint; - } - - public ProductSpuDO setSellPoint(String sellPoint) { - this.sellPoint = sellPoint; - return this; - } - - public String getDescription() { - return description; - } - - public ProductSpuDO setDescription(String description) { - this.description = description; - return this; - } - - public Integer getCid() { - return cid; - } - - public ProductSpuDO setCid(Integer cid) { - this.cid = cid; - return this; - } - - public String getPicUrls() { - return picUrls; - } - - public ProductSpuDO setPicUrls(String picUrls) { - this.picUrls = picUrls; - return this; - } - - public Boolean getVisible() { - return visible; - } - - public ProductSpuDO setVisible(Boolean visible) { - this.visible = visible; - return this; - } - - public Integer getSort() { - return sort; - } - - public ProductSpuDO setSort(Integer sort) { - this.sort = sort; - return this; - } - - public Integer getPrice() { - return price; - } - - public ProductSpuDO setPrice(Integer price) { - this.price = price; - return this; - } - - public Integer getQuantity() { - return quantity; - } - - public ProductSpuDO setQuantity(Integer quantity) { - this.quantity = quantity; - return this; - } - -} \ No newline at end of file +} diff --git a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductStockDO.java b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductStockDO.java index 21043fcaa..8bc60d659 100644 --- a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductStockDO.java +++ b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductStockDO.java @@ -1,11 +1,16 @@ package cn.iocoder.mall.product.dataobject; +import lombok.Data; +import lombok.experimental.Accessors; + import java.util.Date; /** * Product 库存 */ @Deprecated // TODO 芋艿,咱暂时不加库存表和库存服务 +@Data +@Accessors(chain = true) public class ProductStockDO { /** @@ -36,4 +41,4 @@ public class ProductStockDO { */ private Integer status; -} \ No newline at end of file +}