From 394faf12de3a52dc02193e709376fdc6294e9eea Mon Sep 17 00:00:00 2001 From: YunaiV <> Date: Sat, 6 Apr 2019 01:41:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E7=AB=AF=20+=20=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=EF=BC=9A=E5=B0=9D=E8=AF=95=E5=BC=95=E5=85=A5=20lombok=20?= =?UTF-8?q?=EF=BC=8C=E8=A7=A3=E5=86=B3=E5=92=8C=20mapstruct=20=E9=9B=86?= =?UTF-8?q?=E6=88=90=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- promotion/promotion-application/pom.xml | 21 ++++- .../application/vo/admins/AdminsBannerVO.java | 77 ++---------------- .../application/vo/users/UsersBannerVO.java | 24 ++---- .../convert/BannerConvertImpl.java | 6 +- .../convert/CouponTemplateConvertImpl.java | 4 +- .../convert/ProductRecommendConvertImpl.java | 4 +- promotion/promotion-service-api/pom.xml | 52 ++++++++++++- .../mall/promotion/api/bo/BannerBO.java | 78 ++----------------- promotion/promotion-service-impl/pom.xml | 22 +++++- .../promotion/biz/dataobject/BannerDO.java | 69 ++-------------- .../convert/CouponTemplateConvertImpl.java | 4 +- .../convert/ProductRecommendConvertImpl.java | 4 +- 12 files changed, 122 insertions(+), 243 deletions(-) diff --git a/promotion/promotion-application/pom.xml b/promotion/promotion-application/pom.xml index bc8ef85f5..e633ae714 100644 --- a/promotion/promotion-application/pom.xml +++ b/promotion/promotion-application/pom.xml @@ -13,6 +13,7 @@ 1.3.0.Final + 1.16.14 @@ -103,6 +104,17 @@ mapstruct ${org.mapstruct.version} + + org.mapstruct + mapstruct-jdk8 + ${org.mapstruct.version} + + + + org.projectlombok + lombok + ${org.projectlombok.version} + @@ -112,7 +124,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.5.1 + 3.8.0 1.8 1.8 @@ -122,6 +134,11 @@ mapstruct-processor ${org.mapstruct.version} + + org.projectlombok + lombok + ${org.projectlombok.version} + @@ -138,4 +155,4 @@ - \ No newline at end of file + diff --git a/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/vo/admins/AdminsBannerVO.java b/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/vo/admins/AdminsBannerVO.java index ef2f42e88..d73900c29 100644 --- a/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/vo/admins/AdminsBannerVO.java +++ b/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/vo/admins/AdminsBannerVO.java @@ -2,10 +2,14 @@ package cn.iocoder.mall.promotion.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("Banner VO") +@Data +@Accessors(chain = true) public class AdminsBannerVO { @ApiModelProperty(value = "Banner 编号", required = true, example = "1") @@ -25,75 +29,4 @@ public class AdminsBannerVO { @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") private Date createTime; - public Integer getId() { - return id; - } - - public AdminsBannerVO setId(Integer id) { - this.id = id; - return this; - } - - public String getTitle() { - return title; - } - - public AdminsBannerVO setTitle(String title) { - this.title = title; - return this; - } - - public String getUrl() { - return url; - } - - public AdminsBannerVO setUrl(String url) { - this.url = url; - return this; - } - - public Integer getSort() { - return sort; - } - - public AdminsBannerVO setSort(Integer sort) { - this.sort = sort; - return this; - } - - public Integer getStatus() { - return status; - } - - public AdminsBannerVO setStatus(Integer status) { - this.status = status; - return this; - } - - public String getMemo() { - return memo; - } - - public AdminsBannerVO setMemo(String memo) { - this.memo = memo; - return this; - } - - public Date getCreateTime() { - return createTime; - } - - public AdminsBannerVO setCreateTime(Date createTime) { - this.createTime = createTime; - return this; - } - - public String getPicUrl() { - return picUrl; - } - - public AdminsBannerVO setPicUrl(String picUrl) { - this.picUrl = picUrl; - return this; - } -} \ No newline at end of file +} diff --git a/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/vo/users/UsersBannerVO.java b/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/vo/users/UsersBannerVO.java index 5bf0e0627..a056b79de 100644 --- a/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/vo/users/UsersBannerVO.java +++ b/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/vo/users/UsersBannerVO.java @@ -2,8 +2,12 @@ package cn.iocoder.mall.promotion.application.vo.users; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; @ApiModel("Banner VO") +@Data +@Accessors(chain = true) public class UsersBannerVO { @ApiModelProperty(value = "跳转链接", required = true, example = "http://www.baidu.com") @@ -11,22 +15,4 @@ public class UsersBannerVO { @ApiModelProperty(value = "图片链接", required = true, example = "http://www.iocoder.cn/01.jpg") private String picUrl; - public String getUrl() { - return url; - } - - public UsersBannerVO setUrl(String url) { - this.url = url; - return this; - } - - public String getPicUrl() { - return picUrl; - } - - public UsersBannerVO setPicUrl(String picUrl) { - this.picUrl = picUrl; - return this; - } - -} \ No newline at end of file +} diff --git a/promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/BannerConvertImpl.java b/promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/BannerConvertImpl.java index 9c965f183..35482450a 100644 --- a/promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/BannerConvertImpl.java +++ b/promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/BannerConvertImpl.java @@ -12,8 +12,8 @@ import javax.annotation.Generated; @Generated( value = "org.mapstruct.ap.MappingProcessor", - date = "2019-04-05T22:26:04+0800", - comments = "version: 1.3.0.Final, compiler: javac, environment: Java 11.0.1 (Oracle Corporation)" + date = "2019-04-06T01:40:13+0800", + comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)" ) public class BannerConvertImpl implements BannerConvert { @@ -28,11 +28,11 @@ public class BannerConvertImpl implements BannerConvert { adminsBannerVO.setId( bannerBO.getId() ); adminsBannerVO.setTitle( bannerBO.getTitle() ); adminsBannerVO.setUrl( bannerBO.getUrl() ); + adminsBannerVO.setPicUrl( bannerBO.getPicUrl() ); adminsBannerVO.setSort( bannerBO.getSort() ); adminsBannerVO.setStatus( bannerBO.getStatus() ); adminsBannerVO.setMemo( bannerBO.getMemo() ); adminsBannerVO.setCreateTime( bannerBO.getCreateTime() ); - adminsBannerVO.setPicUrl( bannerBO.getPicUrl() ); return adminsBannerVO; } diff --git a/promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/CouponTemplateConvertImpl.java b/promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/CouponTemplateConvertImpl.java index 124f4094a..3a6ead592 100644 --- a/promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/CouponTemplateConvertImpl.java +++ b/promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/CouponTemplateConvertImpl.java @@ -11,8 +11,8 @@ import javax.annotation.Generated; @Generated( value = "org.mapstruct.ap.MappingProcessor", - date = "2019-04-05T22:26:04+0800", - comments = "version: 1.3.0.Final, compiler: javac, environment: Java 11.0.1 (Oracle Corporation)" + date = "2019-04-06T01:40:13+0800", + comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)" ) public class CouponTemplateConvertImpl implements CouponTemplateConvert { diff --git a/promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/ProductRecommendConvertImpl.java b/promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/ProductRecommendConvertImpl.java index 7a2c06886..de469091f 100644 --- a/promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/ProductRecommendConvertImpl.java +++ b/promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/ProductRecommendConvertImpl.java @@ -13,8 +13,8 @@ import javax.annotation.Generated; @Generated( value = "org.mapstruct.ap.MappingProcessor", - date = "2019-04-05T22:26:04+0800", - comments = "version: 1.3.0.Final, compiler: javac, environment: Java 11.0.1 (Oracle Corporation)" + date = "2019-04-06T01:40:13+0800", + comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)" ) public class ProductRecommendConvertImpl implements ProductRecommendConvert { diff --git a/promotion/promotion-service-api/pom.xml b/promotion/promotion-service-api/pom.xml index d2b1af042..c49c39763 100644 --- a/promotion/promotion-service-api/pom.xml +++ b/promotion/promotion-service-api/pom.xml @@ -11,6 +11,11 @@ promotion-service-api + + 1.3.0.Final + 1.16.14 + + javax.validation @@ -22,6 +27,51 @@ 1.0-SNAPSHOT compile + + + org.mapstruct + mapstruct + ${org.mapstruct.version} + + + org.mapstruct + mapstruct-jdk8 + ${org.mapstruct.version} + + + + org.projectlombok + lombok + ${org.projectlombok.version} + - \ No newline at end of file + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 1.8 + 1.8 + + + org.mapstruct + mapstruct-processor + ${org.mapstruct.version} + + + org.projectlombok + lombok + ${org.projectlombok.version} + + + + + + + + + diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/BannerBO.java b/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/BannerBO.java index db6b385b1..da7d360f6 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/BannerBO.java +++ b/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/BannerBO.java @@ -1,10 +1,15 @@ package cn.iocoder.mall.promotion.api.bo; +import lombok.Data; +import lombok.experimental.Accessors; + import java.util.Date; /** * Banner BO */ +@Data +@Accessors(chain = true) public class BannerBO { /** @@ -40,75 +45,4 @@ public class BannerBO { */ private Date createTime; - public Integer getId() { - return id; - } - - public BannerBO setId(Integer id) { - this.id = id; - return this; - } - - public String getTitle() { - return title; - } - - public BannerBO setTitle(String title) { - this.title = title; - return this; - } - - public String getUrl() { - return url; - } - - public BannerBO setUrl(String url) { - this.url = url; - return this; - } - - public Integer getSort() { - return sort; - } - - public BannerBO setSort(Integer sort) { - this.sort = sort; - return this; - } - - public Integer getStatus() { - return status; - } - - public BannerBO setStatus(Integer status) { - this.status = status; - return this; - } - - public String getMemo() { - return memo; - } - - public BannerBO setMemo(String memo) { - this.memo = memo; - return this; - } - - public Date getCreateTime() { - return createTime; - } - - public BannerBO setCreateTime(Date createTime) { - this.createTime = createTime; - return this; - } - - public String getPicUrl() { - return picUrl; - } - - public BannerBO setPicUrl(String picUrl) { - this.picUrl = picUrl; - return this; - } -} \ No newline at end of file +} diff --git a/promotion/promotion-service-impl/pom.xml b/promotion/promotion-service-impl/pom.xml index 222fbfc0c..ce002879a 100644 --- a/promotion/promotion-service-impl/pom.xml +++ b/promotion/promotion-service-impl/pom.xml @@ -14,6 +14,7 @@ 1.3.0.Final + 1.16.14 @@ -53,11 +54,23 @@ mybatis-spring-boot-starter 2.0.0 + org.mapstruct - mapstruct + mapstruct ${org.mapstruct.version} + + org.mapstruct + mapstruct-jdk8 + ${org.mapstruct.version} + + + + org.projectlombok + lombok + ${org.projectlombok.version} + com.google.guava @@ -103,7 +116,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.5.1 + 3.8.0 1.8 1.8 @@ -113,6 +126,11 @@ mapstruct-processor ${org.mapstruct.version} + + org.projectlombok + lombok + ${org.projectlombok.version} + diff --git a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/BannerDO.java b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/BannerDO.java index 60eafd035..9e2cc22b9 100644 --- a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/BannerDO.java +++ b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/BannerDO.java @@ -1,10 +1,14 @@ package cn.iocoder.mall.promotion.biz.dataobject; import cn.iocoder.common.framework.dataobject.DeletableDO; +import lombok.Data; +import lombok.experimental.Accessors; /** * Banner 广告页 */ +@Data +@Accessors(chain = true) public class BannerDO extends DeletableDO { /** @@ -40,67 +44,4 @@ public class BannerDO extends DeletableDO { // TODO 芋艿 点击次数。&& 其他数据相关 - public Integer getId() { - return id; - } - - public BannerDO setId(Integer id) { - this.id = id; - return this; - } - - public String getTitle() { - return title; - } - - public BannerDO setTitle(String title) { - this.title = title; - return this; - } - - public String getUrl() { - return url; - } - - public BannerDO setUrl(String url) { - this.url = url; - return this; - } - - public Integer getStatus() { - return status; - } - - public BannerDO setStatus(Integer status) { - this.status = status; - return this; - } - - public String getMemo() { - return memo; - } - - public BannerDO setMemo(String memo) { - this.memo = memo; - return this; - } - - public Integer getSort() { - return sort; - } - - public BannerDO setSort(Integer sort) { - this.sort = sort; - return this; - } - - public String getPicUrl() { - return picUrl; - } - - public BannerDO setPicUrl(String picUrl) { - this.picUrl = picUrl; - return this; - } - -} \ No newline at end of file +} diff --git a/promotion/promotion-service-impl/target/generated-sources/annotations/cn/iocoder/mall/promotion/biz/convert/CouponTemplateConvertImpl.java b/promotion/promotion-service-impl/target/generated-sources/annotations/cn/iocoder/mall/promotion/biz/convert/CouponTemplateConvertImpl.java index df59c1532..6cb89e9db 100644 --- a/promotion/promotion-service-impl/target/generated-sources/annotations/cn/iocoder/mall/promotion/biz/convert/CouponTemplateConvertImpl.java +++ b/promotion/promotion-service-impl/target/generated-sources/annotations/cn/iocoder/mall/promotion/biz/convert/CouponTemplateConvertImpl.java @@ -12,8 +12,8 @@ import javax.annotation.Generated; @Generated( value = "org.mapstruct.ap.MappingProcessor", - date = "2019-04-06T00:20:10+0800", - comments = "version: 1.3.0.Final, compiler: javac, environment: Java 11.0.1 (Oracle Corporation)" + date = "2019-04-06T01:40:11+0800", + comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)" ) public class CouponTemplateConvertImpl implements CouponTemplateConvert { diff --git a/promotion/promotion-service-impl/target/generated-sources/annotations/cn/iocoder/mall/promotion/biz/convert/ProductRecommendConvertImpl.java b/promotion/promotion-service-impl/target/generated-sources/annotations/cn/iocoder/mall/promotion/biz/convert/ProductRecommendConvertImpl.java index 3ad4be265..e0ab55fac 100644 --- a/promotion/promotion-service-impl/target/generated-sources/annotations/cn/iocoder/mall/promotion/biz/convert/ProductRecommendConvertImpl.java +++ b/promotion/promotion-service-impl/target/generated-sources/annotations/cn/iocoder/mall/promotion/biz/convert/ProductRecommendConvertImpl.java @@ -10,8 +10,8 @@ import javax.annotation.Generated; @Generated( value = "org.mapstruct.ap.MappingProcessor", - date = "2019-04-06T00:20:10+0800", - comments = "version: 1.3.0.Final, compiler: javac, environment: Java 11.0.1 (Oracle Corporation)" + date = "2019-04-06T01:40:11+0800", + comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)" ) public class ProductRecommendConvertImpl implements ProductRecommendConvert {