From d008e92baa3fbf16e858476b93c5005c20e0c633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B2=B3=E9=B9=8F=E7=A3=8A?= Date: Fri, 31 May 2019 17:54:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../target/classes/config/application.yaml | 73 ++++++++++++ .../mapper/OrderCommentReplayMapper.xml | 60 ++++++++++ .../target/classes/application.yaml | 29 +++++ .../target/classes/config/application.yaml | 45 +++++++ .../target/classes/config/application.yaml | 67 +++++++++++ .../admin/convert/AccessLogConvertImpl.java | 70 +++++++++++ .../mall/admin/convert/AdminConvertImpl.java | 110 ++++++++++++++++++ .../admin/convert/DataDictConvertImpl.java | 85 ++++++++++++++ .../mall/admin/convert/OAuth2ConvertImpl.java | 42 +++++++ .../admin/convert/ResourceConvertImpl.java | 91 +++++++++++++++ .../mall/admin/convert/RoleConvertImpl.java | 89 ++++++++++++++ .../admin/convert/SmsSignConvertImpl.java | 64 ++++++++++ .../admin/convert/SmsTemplateConvertImpl.java | 101 ++++++++++++++++ .../biz/convert/UserAddressConvertImpl.java | 87 ++++++++++++++ .../user/biz/convert/UserConvertImpl.java | 78 +++++++++++++ 15 files changed, 1091 insertions(+) create mode 100644 order/order-service-impl/target/classes/config/application.yaml create mode 100644 order/order-service-impl/target/classes/mapper/OrderCommentReplayMapper.xml create mode 100644 product/product-application/target/classes/application.yaml create mode 100644 product/product-service-impl/target/classes/config/application.yaml create mode 100644 system/system-service-impl/target/classes/config/application.yaml create mode 100644 system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/AccessLogConvertImpl.java create mode 100644 system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/AdminConvertImpl.java create mode 100644 system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/DataDictConvertImpl.java create mode 100644 system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/OAuth2ConvertImpl.java create mode 100644 system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/ResourceConvertImpl.java create mode 100644 system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/RoleConvertImpl.java create mode 100644 system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/SmsSignConvertImpl.java create mode 100644 system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/SmsTemplateConvertImpl.java create mode 100644 user/user-service-impl/target/generated-sources/annotations/cn/iocoder/mall/user/biz/convert/UserAddressConvertImpl.java create mode 100644 user/user-service-impl/target/generated-sources/annotations/cn/iocoder/mall/user/biz/convert/UserConvertImpl.java diff --git a/order/order-service-impl/target/classes/config/application.yaml b/order/order-service-impl/target/classes/config/application.yaml new file mode 100644 index 00000000..003a413e --- /dev/null +++ b/order/order-service-impl/target/classes/config/application.yaml @@ -0,0 +1,73 @@ +spring: + # datasource + datasource: + url: jdbc:mysql://180.167.213.26:13306/mall_order?useSSL=false&useUnicode=true&characterEncoding=UTF-8 + driver-class-name: com.mysql.jdbc.Driver + username: root + password: ${MALL_MYSQL_PASSWORD} + +# mybatis +#mybatis: +# config-location: classpath:mybatis-config.xml +# mapper-locations: classpath:mapper/*.xml +# type-aliases-package: cn.iocoder.mall.order.biz.dataobject +# +# mybatis-plus +mybatis-plus: + configuration: + map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。 + global-config: + db-config: + id-type: auto + mapper-locations: classpath*:mapper/*.xml + type-aliases-package: cn.iocoder.mall.order.biz.dataobject + +# dubbo +dubbo: + application: + name: order-service + registry: + address: zookeeper://127.0.0.1:2181 + protocol: + port: -1 + name: dubbo + scan: + base-packages: cn.iocoder.mall.order.biz.service + provider: + filter: -exception + CartService: + version: 1.0.0 + OrderService: + version: 1.0.0 + OrderReturnService: + version: 1.0.0 + OrderLogisticsService: + version: 1.0.0 + OrderCommentService: + version: 1.0.0 + consumer: + timeout: 120000 # 设置长一点,方便调试代码 + ProductSpuService: + version: 1.0.0 + PromotionActivityService: + version: 1.0.0 + CouponService: + version: 1.0.0 + PayRefundService: + version: 1.0.0 + UserAddressService: + version: 1.0.0 + PayTransactionService: + version: 1.0.0 + DataDictService: + version: 1.0.0 + +# logging +logging: + level: + # dao 开启 debug 模式 mybatis 输入 sql + cn.iocoder.mall.order.biz.dao: debug + +# seata +seata: + tx-service-group: my_test_tx_group diff --git a/order/order-service-impl/target/classes/mapper/OrderCommentReplayMapper.xml b/order/order-service-impl/target/classes/mapper/OrderCommentReplayMapper.xml new file mode 100644 index 00000000..17906b50 --- /dev/null +++ b/order/order-service-impl/target/classes/mapper/OrderCommentReplayMapper.xml @@ -0,0 +1,60 @@ + + + + + + id,comment_id,reply_type,parent_id,parent_user_id,parent_user_nick_name,parent_user_avatar,reply_content, + reply_user_id,reply_user_nick_name,reply_user_avatar,user_type,reply_like_count,create_time,update_time + + + + + INSERT INTO order_comment_replay(comment_id,reply_type,parent_id,parent_user_id,parent_user_nick_name,parent_user_avatar,reply_content,reply_user_id + reply_user_nick_name,reply_user_avatar,user_type,create_time,update_time) + VALUES (#{commentId},#{replyType},#{parentId},#{parentUserId},#{parentUserNickName},#{parentUserAvatar},#{replyContent},#{replyUserId}, + #{replyUserNickName},#{replyUserAvatar},#{userType},#{createTime},#{updateTime}) + + + + + + + + + + + + + + + + diff --git a/product/product-application/target/classes/application.yaml b/product/product-application/target/classes/application.yaml new file mode 100644 index 00000000..759bb545 --- /dev/null +++ b/product/product-application/target/classes/application.yaml @@ -0,0 +1,29 @@ +spring: + application: + name: product-application + cloud: + sentinel: + transport: + port: 8719 + dashboard: localhost:12088 + metric: + charset: UTF-8 + eager: false + +# server +server: + port: 18081 + servlet: + context-path: /product-api/ + +swagger: + enable: false + + +management: + endpoints: + web: + exposure: + include: health,info,env,metrics,prometheus + metrics: + enabled: true diff --git a/product/product-service-impl/target/classes/config/application.yaml b/product/product-service-impl/target/classes/config/application.yaml new file mode 100644 index 00000000..e4814b7b --- /dev/null +++ b/product/product-service-impl/target/classes/config/application.yaml @@ -0,0 +1,45 @@ +spring: + # datasource + datasource: + url: jdbc:mysql://180.167.213.26:13306/mall_product?useSSL=false&useUnicode=true&characterEncoding=UTF-8 + driver-class-name: com.mysql.jdbc.Driver + username: root + password: ${MALL_MYSQL_PASSWORD} + +# mybatis +mybatis-plus: + config-location: classpath:mybatis-config.xml + mapper-locations: classpath:mapper/*.xml + type-aliases-package: cn.iocoder.mall.product.dataobject + +# dubbo +dubbo: + application: + name: product-service + registry: + address: zookeeper://127.0.0.1:2181 + protocol: + port: -1 + name: dubbo + scan: + base-packages: cn.iocoder.mall.product.service + provider: + filter: -exception + ProductAttrService: + version: 1.0.0 + ProductCategoryService: + version: 1.0.0 + ProductSpuService: + version: 1.0.0 + OAuth2Service: + version: 1.0.0 + +# rocketmq +rocketmq: + name-server: 127.0.0.1:9876 + producer: + group: product-producer-group + +# seata +seata: + tx-service-group: my_test_tx_group diff --git a/system/system-service-impl/target/classes/config/application.yaml b/system/system-service-impl/target/classes/config/application.yaml new file mode 100644 index 00000000..6236180c --- /dev/null +++ b/system/system-service-impl/target/classes/config/application.yaml @@ -0,0 +1,67 @@ +spring: + # datasource + datasource: + url: jdbc:mysql://180.167.213.26:13306/mall_admin?useSSL=false&useUnicode=true&characterEncoding=UTF-8 + driver-class-name: com.mysql.jdbc.Driver + username: root + password: ${MALL_MYSQL_PASSWORD} + +# mybatis +#mybatis: +# config-location: classpath:mybatis-config.xml +# mapper-locations: classpath:mapper/*.xml +# type-aliases-package: cn.iocoder.mall.admin.dataobject + +# mybatis-plus +mybatis-plus: + configuration: + map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。 + global-config: + db-config: + id-type: auto + logic-delete-value: 1 # 逻辑已删除值(默认为 1) + logic-not-delete-value: 0 # 逻辑未删除值(默认为 0) + mapper-locations: classpath*:mapper/*.xml + type-aliases-package: cn.iocoder.mall.admin.dataobject + +# sms +sms: + yunPian: + apiKey: + aliYun: + accessKeyId: + accessSecret: + +# dubbo +dubbo: + application: + name: admin-service + registry: + address: zookeeper://127.0.0.1:2181 + protocol: + port: -1 + name: dubbo + scan: + base-packages: cn.iocoder.mall.admin.service + provider: + filter: -exception + AdminAccessLogService: + version: 1.0.0 + AdminService: + version: 1.0.0 + DataDictService: + version: 1.0.0 + OAuth2Service: + version: 1.0.0 + ResourceService: + version: 1.0.0 + RoleService: + version: 1.0.0 + SmsService: + version: 1.0.0 + +# logging +logging: + level: + # dao 开启 debug 模式 mybatis 输入 sql + cn.iocoder.mall.admin.dao: debug diff --git a/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/AccessLogConvertImpl.java b/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/AccessLogConvertImpl.java new file mode 100644 index 00000000..73e01683 --- /dev/null +++ b/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/AccessLogConvertImpl.java @@ -0,0 +1,70 @@ +package cn.iocoder.mall.admin.convert; + +import cn.iocoder.mall.admin.api.dto.systemlog.AccessLogAddDTO; +import cn.iocoder.mall.admin.api.dto.systemlog.ExceptionLogAddDTO; +import cn.iocoder.mall.admin.dataobject.AccessLogDO; +import cn.iocoder.mall.admin.dataobject.ExceptionLogDO; +import javax.annotation.Generated; + +@Generated( + value = "org.mapstruct.ap.MappingProcessor", + date = "2019-05-31T17:43:56+0800", + comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)" +) +public class AccessLogConvertImpl implements AccessLogConvert { + + @Override + public AccessLogDO convert(AccessLogAddDTO accessLogAddDTO) { + if ( accessLogAddDTO == null ) { + return null; + } + + AccessLogDO accessLogDO = new AccessLogDO(); + + accessLogDO.setTraceId( accessLogAddDTO.getTraceId() ); + accessLogDO.setUserId( accessLogAddDTO.getUserId() ); + accessLogDO.setUserType( accessLogAddDTO.getUserType() ); + accessLogDO.setApplicationName( accessLogAddDTO.getApplicationName() ); + accessLogDO.setUri( accessLogAddDTO.getUri() ); + accessLogDO.setQueryString( accessLogAddDTO.getQueryString() ); + accessLogDO.setMethod( accessLogAddDTO.getMethod() ); + accessLogDO.setUserAgent( accessLogAddDTO.getUserAgent() ); + accessLogDO.setIp( accessLogAddDTO.getIp() ); + accessLogDO.setStartTime( accessLogAddDTO.getStartTime() ); + accessLogDO.setResponseTime( accessLogAddDTO.getResponseTime() ); + accessLogDO.setErrorCode( accessLogAddDTO.getErrorCode() ); + accessLogDO.setErrorMessage( accessLogAddDTO.getErrorMessage() ); + + return accessLogDO; + } + + @Override + public ExceptionLogDO convert(ExceptionLogAddDTO exceptionLogAddDTO) { + if ( exceptionLogAddDTO == null ) { + return null; + } + + ExceptionLogDO exceptionLogDO = new ExceptionLogDO(); + + exceptionLogDO.setTraceId( exceptionLogAddDTO.getTraceId() ); + exceptionLogDO.setUserId( exceptionLogAddDTO.getUserId() ); + exceptionLogDO.setUserType( exceptionLogAddDTO.getUserType() ); + exceptionLogDO.setApplicationName( exceptionLogAddDTO.getApplicationName() ); + exceptionLogDO.setUri( exceptionLogAddDTO.getUri() ); + exceptionLogDO.setQueryString( exceptionLogAddDTO.getQueryString() ); + exceptionLogDO.setMethod( exceptionLogAddDTO.getMethod() ); + exceptionLogDO.setUserAgent( exceptionLogAddDTO.getUserAgent() ); + exceptionLogDO.setIp( exceptionLogAddDTO.getIp() ); + exceptionLogDO.setExceptionTime( exceptionLogAddDTO.getExceptionTime() ); + exceptionLogDO.setExceptionName( exceptionLogAddDTO.getExceptionName() ); + exceptionLogDO.setExceptionMessage( exceptionLogAddDTO.getExceptionMessage() ); + exceptionLogDO.setExceptionRootCauseMessage( exceptionLogAddDTO.getExceptionRootCauseMessage() ); + exceptionLogDO.setExceptionStackTrace( exceptionLogAddDTO.getExceptionStackTrace() ); + exceptionLogDO.setExceptionClassName( exceptionLogAddDTO.getExceptionClassName() ); + exceptionLogDO.setExceptionFileName( exceptionLogAddDTO.getExceptionFileName() ); + exceptionLogDO.setExceptionMethodName( exceptionLogAddDTO.getExceptionMethodName() ); + exceptionLogDO.setExceptionLineNumber( exceptionLogAddDTO.getExceptionLineNumber() ); + + return exceptionLogDO; + } +} diff --git a/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/AdminConvertImpl.java b/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/AdminConvertImpl.java new file mode 100644 index 00000000..1be58f08 --- /dev/null +++ b/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/AdminConvertImpl.java @@ -0,0 +1,110 @@ +package cn.iocoder.mall.admin.convert; + +import cn.iocoder.common.framework.vo.PageResult; +import cn.iocoder.mall.admin.api.bo.admin.AdminAuthenticationBO; +import cn.iocoder.mall.admin.api.bo.admin.AdminBO; +import cn.iocoder.mall.admin.api.dto.admin.AdminAddDTO; +import cn.iocoder.mall.admin.api.dto.admin.AdminUpdateDTO; +import cn.iocoder.mall.admin.dataobject.AdminDO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Generated; + +@Generated( + value = "org.mapstruct.ap.MappingProcessor", + date = "2019-05-31T17:43:55+0800", + comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)" +) +public class AdminConvertImpl implements AdminConvert { + + @Override + public AdminBO convert(AdminDO adminDO) { + if ( adminDO == null ) { + return null; + } + + AdminBO adminBO = new AdminBO(); + + adminBO.setId( adminDO.getId() ); + adminBO.setUsername( adminDO.getUsername() ); + adminBO.setNickname( adminDO.getNickname() ); + adminBO.setStatus( adminDO.getStatus() ); + adminBO.setCreateTime( adminDO.getCreateTime() ); + + return adminBO; + } + + @Override + public AdminAuthenticationBO convert2(AdminDO admin) { + if ( admin == null ) { + return null; + } + + AdminAuthenticationBO adminAuthenticationBO = new AdminAuthenticationBO(); + + adminAuthenticationBO.setId( admin.getId() ); + adminAuthenticationBO.setNickname( admin.getNickname() ); + + return adminAuthenticationBO; + } + + @Override + public AdminDO convert(AdminAddDTO adminAddDTO) { + if ( adminAddDTO == null ) { + return null; + } + + AdminDO adminDO = new AdminDO(); + + adminDO.setUsername( adminAddDTO.getUsername() ); + adminDO.setNickname( adminAddDTO.getNickname() ); + adminDO.setPassword( adminAddDTO.getPassword() ); + + return adminDO; + } + + @Override + public AdminDO convert(AdminUpdateDTO adminUpdateDTO) { + if ( adminUpdateDTO == null ) { + return null; + } + + AdminDO adminDO = new AdminDO(); + + adminDO.setId( adminUpdateDTO.getId() ); + adminDO.setUsername( adminUpdateDTO.getUsername() ); + adminDO.setNickname( adminUpdateDTO.getNickname() ); + adminDO.setPassword( adminUpdateDTO.getPassword() ); + + return adminDO; + } + + @Override + public List convert(List adminBOs) { + if ( adminBOs == null ) { + return null; + } + + List list = new ArrayList( adminBOs.size() ); + for ( AdminDO adminDO : adminBOs ) { + list.add( convert( adminDO ) ); + } + + return list; + } + + @Override + public PageResult convert(IPage page) { + if ( page == null ) { + return null; + } + + PageResult pageResult = new PageResult(); + + pageResult.setList( convert( page.getRecords() ) ); + pageResult.setTotal( (int) page.getTotal() ); + + return pageResult; + } +} diff --git a/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/DataDictConvertImpl.java b/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/DataDictConvertImpl.java new file mode 100644 index 00000000..9267ce3d --- /dev/null +++ b/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/DataDictConvertImpl.java @@ -0,0 +1,85 @@ +package cn.iocoder.mall.admin.convert; + +import cn.iocoder.mall.admin.api.bo.datadict.DataDictBO; +import cn.iocoder.mall.admin.api.dto.datadict.DataDictAddDTO; +import cn.iocoder.mall.admin.api.dto.datadict.DataDictUpdateDTO; +import cn.iocoder.mall.admin.dataobject.DataDictDO; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Generated; + +@Generated( + value = "org.mapstruct.ap.MappingProcessor", + date = "2019-05-31T17:43:56+0800", + comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)" +) +public class DataDictConvertImpl implements DataDictConvert { + + @Override + public DataDictDO convert(DataDictAddDTO dataDictAddDTO) { + if ( dataDictAddDTO == null ) { + return null; + } + + DataDictDO dataDictDO = new DataDictDO(); + + dataDictDO.setEnumValue( dataDictAddDTO.getEnumValue() ); + dataDictDO.setValue( dataDictAddDTO.getValue() ); + dataDictDO.setDisplayName( dataDictAddDTO.getDisplayName() ); + dataDictDO.setSort( dataDictAddDTO.getSort() ); + dataDictDO.setMemo( dataDictAddDTO.getMemo() ); + + return dataDictDO; + } + + @Override + public DataDictDO convert(DataDictUpdateDTO dataDictUpdateDTO) { + if ( dataDictUpdateDTO == null ) { + return null; + } + + DataDictDO dataDictDO = new DataDictDO(); + + dataDictDO.setId( dataDictUpdateDTO.getId() ); + dataDictDO.setEnumValue( dataDictUpdateDTO.getEnumValue() ); + dataDictDO.setValue( dataDictUpdateDTO.getValue() ); + dataDictDO.setDisplayName( dataDictUpdateDTO.getDisplayName() ); + dataDictDO.setSort( dataDictUpdateDTO.getSort() ); + dataDictDO.setMemo( dataDictUpdateDTO.getMemo() ); + + return dataDictDO; + } + + @Override + public DataDictBO convert(DataDictDO dataDictDO) { + if ( dataDictDO == null ) { + return null; + } + + DataDictBO dataDictBO = new DataDictBO(); + + dataDictBO.setId( dataDictDO.getId() ); + dataDictBO.setEnumValue( dataDictDO.getEnumValue() ); + dataDictBO.setValue( dataDictDO.getValue() ); + dataDictBO.setDisplayName( dataDictDO.getDisplayName() ); + dataDictBO.setSort( dataDictDO.getSort() ); + dataDictBO.setMemo( dataDictDO.getMemo() ); + dataDictBO.setCreateTime( dataDictDO.getCreateTime() ); + + return dataDictBO; + } + + @Override + public List convert(List dataDictDOs) { + if ( dataDictDOs == null ) { + return null; + } + + List list = new ArrayList( dataDictDOs.size() ); + for ( DataDictDO dataDictDO : dataDictDOs ) { + list.add( convert( dataDictDO ) ); + } + + return list; + } +} diff --git a/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/OAuth2ConvertImpl.java b/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/OAuth2ConvertImpl.java new file mode 100644 index 00000000..12a9f039 --- /dev/null +++ b/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/OAuth2ConvertImpl.java @@ -0,0 +1,42 @@ +package cn.iocoder.mall.admin.convert; + +import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AccessTokenBO; +import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AuthenticationBO; +import cn.iocoder.mall.admin.dataobject.OAuth2AccessTokenDO; +import javax.annotation.Generated; + +@Generated( + value = "org.mapstruct.ap.MappingProcessor", + date = "2019-05-31T17:43:56+0800", + comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)" +) +public class OAuth2ConvertImpl implements OAuth2Convert { + + @Override + public OAuth2AccessTokenBO convertToAccessToken(OAuth2AccessTokenDO oauth2AccessTokenDO) { + if ( oauth2AccessTokenDO == null ) { + return null; + } + + OAuth2AccessTokenBO oAuth2AccessTokenBO = new OAuth2AccessTokenBO(); + + oAuth2AccessTokenBO.setAccessToken( oauth2AccessTokenDO.getId() ); + oAuth2AccessTokenBO.setRefreshToken( oauth2AccessTokenDO.getRefreshToken() ); + + return oAuth2AccessTokenBO; + } + + @Override + public OAuth2AuthenticationBO convertToAuthentication(OAuth2AccessTokenDO oauth2AccessTokenDO) { + if ( oauth2AccessTokenDO == null ) { + return null; + } + + OAuth2AuthenticationBO oAuth2AuthenticationBO = new OAuth2AuthenticationBO(); + + oAuth2AuthenticationBO.setUserId( oauth2AccessTokenDO.getUserId() ); + oAuth2AuthenticationBO.setUserType( oauth2AccessTokenDO.getUserType() ); + + return oAuth2AuthenticationBO; + } +} diff --git a/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/ResourceConvertImpl.java b/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/ResourceConvertImpl.java new file mode 100644 index 00000000..c80afeea --- /dev/null +++ b/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/ResourceConvertImpl.java @@ -0,0 +1,91 @@ +package cn.iocoder.mall.admin.convert; + +import cn.iocoder.mall.admin.api.bo.resource.ResourceBO; +import cn.iocoder.mall.admin.api.dto.resource.ResourceAddDTO; +import cn.iocoder.mall.admin.api.dto.resource.ResourceUpdateDTO; +import cn.iocoder.mall.admin.dataobject.ResourceDO; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Generated; + +@Generated( + value = "org.mapstruct.ap.MappingProcessor", + date = "2019-05-31T17:43:56+0800", + comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)" +) +public class ResourceConvertImpl implements ResourceConvert { + + @Override + public ResourceBO convert(ResourceDO resourceDO) { + if ( resourceDO == null ) { + return null; + } + + ResourceBO resourceBO = new ResourceBO(); + + resourceBO.setPermissions( translateListFromString( resourceDO.getPermissions() ) ); + resourceBO.setId( resourceDO.getId() ); + resourceBO.setType( resourceDO.getType() ); + resourceBO.setSort( resourceDO.getSort() ); + resourceBO.setDisplayName( resourceDO.getDisplayName() ); + resourceBO.setPid( resourceDO.getPid() ); + resourceBO.setHandler( resourceDO.getHandler() ); + resourceBO.setIcon( resourceDO.getIcon() ); + resourceBO.setCreateTime( resourceDO.getCreateTime() ); + + return resourceBO; + } + + @Override + public List convert(List resourceDOs) { + if ( resourceDOs == null ) { + return null; + } + + List list = new ArrayList( resourceDOs.size() ); + for ( ResourceDO resourceDO : resourceDOs ) { + list.add( convert( resourceDO ) ); + } + + return list; + } + + @Override + public ResourceDO convert(ResourceAddDTO resourceAddDTO) { + if ( resourceAddDTO == null ) { + return null; + } + + ResourceDO resourceDO = new ResourceDO(); + + resourceDO.setPermissions( translateStringFromList( resourceAddDTO.getPermissions() ) ); + resourceDO.setType( resourceAddDTO.getType() ); + resourceDO.setSort( resourceAddDTO.getSort() ); + resourceDO.setDisplayName( resourceAddDTO.getDisplayName() ); + resourceDO.setPid( resourceAddDTO.getPid() ); + resourceDO.setHandler( resourceAddDTO.getHandler() ); + resourceDO.setIcon( resourceAddDTO.getIcon() ); + + return resourceDO; + } + + @Override + public ResourceDO convert(ResourceUpdateDTO resourceUpdateDTO) { + if ( resourceUpdateDTO == null ) { + return null; + } + + ResourceDO resourceDO = new ResourceDO(); + + resourceDO.setPermissions( translateStringFromList( resourceUpdateDTO.getPermissions() ) ); + resourceDO.setId( resourceUpdateDTO.getId() ); + resourceDO.setType( resourceUpdateDTO.getType() ); + resourceDO.setSort( resourceUpdateDTO.getSort() ); + resourceDO.setDisplayName( resourceUpdateDTO.getDisplayName() ); + resourceDO.setPid( resourceUpdateDTO.getPid() ); + resourceDO.setHandler( resourceUpdateDTO.getHandler() ); + resourceDO.setIcon( resourceUpdateDTO.getIcon() ); + + return resourceDO; + } +} diff --git a/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/RoleConvertImpl.java b/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/RoleConvertImpl.java new file mode 100644 index 00000000..e6628f47 --- /dev/null +++ b/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/RoleConvertImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.mall.admin.convert; + +import cn.iocoder.common.framework.vo.PageResult; +import cn.iocoder.mall.admin.api.bo.role.RoleBO; +import cn.iocoder.mall.admin.api.dto.role.RoleAddDTO; +import cn.iocoder.mall.admin.api.dto.role.RoleUpdateDTO; +import cn.iocoder.mall.admin.dataobject.RoleDO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Generated; + +@Generated( + value = "org.mapstruct.ap.MappingProcessor", + date = "2019-05-31T17:43:56+0800", + comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)" +) +public class RoleConvertImpl implements RoleConvert { + + @Override + public RoleDO convert(RoleAddDTO roleAddDTO) { + if ( roleAddDTO == null ) { + return null; + } + + RoleDO roleDO = new RoleDO(); + + roleDO.setName( roleAddDTO.getName() ); + + return roleDO; + } + + @Override + public RoleDO convert(RoleUpdateDTO roleUpdateDTO) { + if ( roleUpdateDTO == null ) { + return null; + } + + RoleDO roleDO = new RoleDO(); + + roleDO.setId( roleUpdateDTO.getId() ); + roleDO.setName( roleUpdateDTO.getName() ); + + return roleDO; + } + + @Override + public RoleBO convert(RoleDO roleDO) { + if ( roleDO == null ) { + return null; + } + + RoleBO roleBO = new RoleBO(); + + roleBO.setId( roleDO.getId() ); + roleBO.setName( roleDO.getName() ); + roleBO.setCreateTime( roleDO.getCreateTime() ); + + return roleBO; + } + + @Override + public List convert(List roleDOs) { + if ( roleDOs == null ) { + return null; + } + + List list = new ArrayList( roleDOs.size() ); + for ( RoleDO roleDO : roleDOs ) { + list.add( convert( roleDO ) ); + } + + return list; + } + + @Override + public PageResult convert(IPage page) { + if ( page == null ) { + return null; + } + + PageResult pageResult = new PageResult(); + + pageResult.setList( convert( page.getRecords() ) ); + pageResult.setTotal( (int) page.getTotal() ); + + return pageResult; + } +} diff --git a/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/SmsSignConvertImpl.java b/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/SmsSignConvertImpl.java new file mode 100644 index 00000000..708833bf --- /dev/null +++ b/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/SmsSignConvertImpl.java @@ -0,0 +1,64 @@ +package cn.iocoder.mall.admin.convert; + +import cn.iocoder.mall.admin.api.bo.sms.PageSmsSignBO.Sign; +import cn.iocoder.mall.admin.api.bo.sms.SmsSignBO; +import cn.iocoder.mall.admin.dataobject.SmsSignDO; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Generated; + +@Generated( + value = "org.mapstruct.ap.MappingProcessor", + date = "2019-05-31T17:43:56+0800", + comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)" +) +public class SmsSignConvertImpl implements SmsSignConvert { + + @Override + public SmsSignBO convert(SmsSignDO smsSignDO) { + if ( smsSignDO == null ) { + return null; + } + + SmsSignBO smsSignBO = new SmsSignBO(); + + smsSignBO.setId( smsSignDO.getId() ); + smsSignBO.setSign( smsSignDO.getSign() ); + smsSignBO.setApplyStatus( smsSignDO.getApplyStatus() ); + smsSignBO.setApplyMessage( smsSignDO.getApplyMessage() ); + + return smsSignBO; + } + + @Override + public List convert(List smsSignDOList) { + if ( smsSignDOList == null ) { + return null; + } + + List list = new ArrayList( smsSignDOList.size() ); + for ( SmsSignDO smsSignDO : smsSignDOList ) { + list.add( smsSignDOToSign( smsSignDO ) ); + } + + return list; + } + + protected Sign smsSignDOToSign(SmsSignDO smsSignDO) { + if ( smsSignDO == null ) { + return null; + } + + Sign sign = new Sign(); + + sign.setId( smsSignDO.getId() ); + sign.setPlatform( smsSignDO.getPlatform() ); + sign.setSign( smsSignDO.getSign() ); + sign.setApplyStatus( smsSignDO.getApplyStatus() ); + sign.setApplyMessage( smsSignDO.getApplyMessage() ); + sign.setUpdateTime( smsSignDO.getUpdateTime() ); + sign.setCreateTime( smsSignDO.getCreateTime() ); + + return sign; + } +} diff --git a/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/SmsTemplateConvertImpl.java b/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/SmsTemplateConvertImpl.java new file mode 100644 index 00000000..1aab1a29 --- /dev/null +++ b/system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/SmsTemplateConvertImpl.java @@ -0,0 +1,101 @@ +package cn.iocoder.mall.admin.convert; + +import cn.iocoder.mall.admin.api.bo.sms.PageSmsTemplateBO.Sign; +import cn.iocoder.mall.admin.api.bo.sms.PageSmsTemplateBO.Template; +import cn.iocoder.mall.admin.api.bo.sms.SmsTemplateBO; +import cn.iocoder.mall.admin.dataobject.SmsSignDO; +import cn.iocoder.mall.admin.dataobject.SmsTemplateDO; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Generated; + +@Generated( + value = "org.mapstruct.ap.MappingProcessor", + date = "2019-05-31T17:43:56+0800", + comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)" +) +public class SmsTemplateConvertImpl implements SmsTemplateConvert { + + @Override + public SmsTemplateBO convert(SmsTemplateDO smsTemplateDO) { + if ( smsTemplateDO == null ) { + return null; + } + + SmsTemplateBO smsTemplateBO = new SmsTemplateBO(); + + smsTemplateBO.setId( smsTemplateDO.getId() ); + smsTemplateBO.setSmsSignId( smsTemplateDO.getSmsSignId() ); + smsTemplateBO.setTemplate( smsTemplateDO.getTemplate() ); + smsTemplateBO.setApplyStatus( smsTemplateDO.getApplyStatus() ); + smsTemplateBO.setApplyMessage( smsTemplateDO.getApplyMessage() ); + + return smsTemplateBO; + } + + @Override + public List