From 7916b82dff331c5453059dafbbece103594c8a25 Mon Sep 17 00:00:00 2001 From: haoxr <1490493387@qq.com> Date: Thu, 1 Feb 2024 17:34:15 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=A1=B9=E7=9B=AE=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E8=B0=83=E6=95=B4=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mall-oms/oms-api/pom.xml | 2 +- mall-pms/pms-api/pom.xml | 2 +- mall-sms/sms-api/pom.xml | 2 +- mall-sms/sms-boot/pom.xml | 2 +- mall-ums/ums-api/pom.xml | 2 +- mall-ums/ums-boot/pom.xml | 2 +- pom.xml | 35 ++++++--------- .../{common-core => common-base}/pom.xml | 2 +- .../com/youlai/common/base/BaseEntity.java | 0 .../com/youlai/common/base/BasePageQuery.java | 0 .../java/com/youlai/common/base/BaseVO.java | 0 .../com/youlai/common/base/IBaseEnum.java | 0 .../common/constant/GlobalConstants.java | 15 +++++++ .../common/constant/JwtClaimConstants.java | 0 .../common/constant/MemberConstants.java | 0 .../common/constant/OrderConstants.java | 0 .../common/constant/ProductConstants.java | 0 .../common/constant/RedisConstants.java} | 17 ++++--- .../common/constant/SystemConstants.java | 4 +- .../youlai/common/enums/DataScopeEnum.java | 0 .../com/youlai/common/enums/GenderEnum.java | 0 .../com/youlai/common/enums/MenuTypeEnum.java | 0 .../com/youlai/common/enums/StatusEnum.java | 0 .../common/factory/NamedThreadFactory.java | 0 .../com/youlai/common/result/IResultCode.java | 0 .../com/youlai/common/result/PageResult.java | 0 .../java/com/youlai/common/result/Result.java | 0 .../com/youlai/common/result/ResultCode.java | 0 .../common/constant/ExcelConstants.java | 16 ------- .../common/constant/GlobalConstants.java | 31 ------------- youlai-common/common-file/pom.xml | 45 ------------------- .../youlai/common/file/model/FileInfo.java | 12 ----- ...ot.autoconfigure.AutoConfiguration.imports | 3 -- youlai-common/common-mybatis/pom.xml | 2 +- youlai-common/common-redis/pom.xml | 2 +- ...ot.autoconfigure.AutoConfiguration.imports | 4 -- youlai-common/common-sms/pom.xml | 44 ------------------ .../sms/config/AliyunSmsProperties.java | 32 ------------- .../sms/controller/SmsCodeController.java | 29 ------------ .../main/resources/META-INF/spring.factories | 4 -- youlai-common/common-web/pom.xml | 4 +- youlai-common/pom.xml | 6 +-- youlai-system/system-api/pom.xml | 2 +- 43 files changed, 56 insertions(+), 265 deletions(-) rename youlai-common/{common-core => common-base}/pom.xml (96%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/base/BaseEntity.java (100%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/base/BasePageQuery.java (100%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/base/BaseVO.java (100%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/base/IBaseEnum.java (100%) create mode 100644 youlai-common/common-base/src/main/java/com/youlai/common/constant/GlobalConstants.java rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/constant/JwtClaimConstants.java (100%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/constant/MemberConstants.java (100%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/constant/OrderConstants.java (100%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/constant/ProductConstants.java (100%) rename youlai-common/{common-core/src/main/java/com/youlai/common/constant/SecurityConstants.java => common-base/src/main/java/com/youlai/common/constant/RedisConstants.java} (59%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/constant/SystemConstants.java (85%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/enums/DataScopeEnum.java (100%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/enums/GenderEnum.java (100%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/enums/MenuTypeEnum.java (100%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/enums/StatusEnum.java (100%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/factory/NamedThreadFactory.java (100%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/result/IResultCode.java (100%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/result/PageResult.java (100%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/result/Result.java (100%) rename youlai-common/{common-core => common-base}/src/main/java/com/youlai/common/result/ResultCode.java (100%) delete mode 100644 youlai-common/common-core/src/main/java/com/youlai/common/constant/ExcelConstants.java delete mode 100644 youlai-common/common-core/src/main/java/com/youlai/common/constant/GlobalConstants.java delete mode 100644 youlai-common/common-file/pom.xml delete mode 100644 youlai-common/common-file/src/main/java/com/youlai/common/file/model/FileInfo.java delete mode 100644 youlai-common/common-file/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports delete mode 100644 youlai-common/common-resourceserver/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports delete mode 100644 youlai-common/common-sms/pom.xml delete mode 100644 youlai-common/common-sms/src/main/java/com/youlai/common/sms/config/AliyunSmsProperties.java delete mode 100644 youlai-common/common-sms/src/main/java/com/youlai/common/sms/controller/SmsCodeController.java delete mode 100644 youlai-common/common-sms/src/main/resources/META-INF/spring.factories diff --git a/mall-oms/oms-api/pom.xml b/mall-oms/oms-api/pom.xml index 4d56d9f21..7771e99a2 100644 --- a/mall-oms/oms-api/pom.xml +++ b/mall-oms/oms-api/pom.xml @@ -15,7 +15,7 @@ com.youlai - common-core + common-base diff --git a/mall-pms/pms-api/pom.xml b/mall-pms/pms-api/pom.xml index 43ded1441..16418e612 100644 --- a/mall-pms/pms-api/pom.xml +++ b/mall-pms/pms-api/pom.xml @@ -15,7 +15,7 @@ com.youlai - common-core + common-base diff --git a/mall-sms/sms-api/pom.xml b/mall-sms/sms-api/pom.xml index 26aa7d8e4..7953c94e4 100644 --- a/mall-sms/sms-api/pom.xml +++ b/mall-sms/sms-api/pom.xml @@ -15,7 +15,7 @@ com.youlai - common-core + common-base diff --git a/mall-sms/sms-boot/pom.xml b/mall-sms/sms-boot/pom.xml index 5585db912..5afce6380 100644 --- a/mall-sms/sms-boot/pom.xml +++ b/mall-sms/sms-boot/pom.xml @@ -80,7 +80,7 @@ com.youlai - common-resourceserver + common-security diff --git a/mall-ums/ums-api/pom.xml b/mall-ums/ums-api/pom.xml index 95921070a..60ac90851 100644 --- a/mall-ums/ums-api/pom.xml +++ b/mall-ums/ums-api/pom.xml @@ -14,7 +14,7 @@ com.youlai - common-core + common-base diff --git a/mall-ums/ums-boot/pom.xml b/mall-ums/ums-boot/pom.xml index 08545462d..c9e7d4ad5 100644 --- a/mall-ums/ums-boot/pom.xml +++ b/mall-ums/ums-boot/pom.xml @@ -70,7 +70,7 @@ com.youlai - common-resourceserver + common-security diff --git a/pom.xml b/pom.xml index 900f7b28b..8b10d01bd 100644 --- a/pom.xml +++ b/pom.xml @@ -35,39 +35,40 @@ 17 17 - 3.1.5 + 3.2.1 - 2022.0.4 + 2023.0.0 2022.0.0.0 - 1.1.3 + 1.2.1 - + 8.0.28 1.2.20 3.5.5 - + 4.3.0 2.1.0 - - 5.8.22 + + 5.8.25 1.5.5.Final 4.1.5.B 3.3.2 9.16.1 - 4.5.25 - 2.1.0 + 4.6.4 + 2.2.1 + + + 3.17.4 8.5.6 4.8.1 - - 3.16.3 3.24.3 @@ -105,7 +106,6 @@ import - com.github.xiaoymin @@ -115,7 +115,6 @@ import - mysql mysql-connector-java @@ -162,7 +161,7 @@ com.youlai - common-core + common-base ${project.version} @@ -204,13 +203,7 @@ com.youlai - common-file - ${project.version} - - - - com.youlai - common-resourceserver + common-security ${project.version} diff --git a/youlai-common/common-core/pom.xml b/youlai-common/common-base/pom.xml similarity index 96% rename from youlai-common/common-core/pom.xml rename to youlai-common/common-base/pom.xml index da157ec2b..a886d5b72 100644 --- a/youlai-common/common-core/pom.xml +++ b/youlai-common/common-base/pom.xml @@ -9,7 +9,7 @@ 4.0.0 - common-core + common-base diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/base/BaseEntity.java b/youlai-common/common-base/src/main/java/com/youlai/common/base/BaseEntity.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/base/BaseEntity.java rename to youlai-common/common-base/src/main/java/com/youlai/common/base/BaseEntity.java diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/base/BasePageQuery.java b/youlai-common/common-base/src/main/java/com/youlai/common/base/BasePageQuery.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/base/BasePageQuery.java rename to youlai-common/common-base/src/main/java/com/youlai/common/base/BasePageQuery.java diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/base/BaseVO.java b/youlai-common/common-base/src/main/java/com/youlai/common/base/BaseVO.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/base/BaseVO.java rename to youlai-common/common-base/src/main/java/com/youlai/common/base/BaseVO.java diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/base/IBaseEnum.java b/youlai-common/common-base/src/main/java/com/youlai/common/base/IBaseEnum.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/base/IBaseEnum.java rename to youlai-common/common-base/src/main/java/com/youlai/common/base/IBaseEnum.java diff --git a/youlai-common/common-base/src/main/java/com/youlai/common/constant/GlobalConstants.java b/youlai-common/common-base/src/main/java/com/youlai/common/constant/GlobalConstants.java new file mode 100644 index 000000000..d3925ce1c --- /dev/null +++ b/youlai-common/common-base/src/main/java/com/youlai/common/constant/GlobalConstants.java @@ -0,0 +1,15 @@ +package com.youlai.common.constant; + +/** + * 全局常量 + * + * @author haoxr + * @since 2021/10/30 9:32 + */ +public interface GlobalConstants { + + /** + * 全局状态-是 + */ + Integer STATUS_YES = 1; +} diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/constant/JwtClaimConstants.java b/youlai-common/common-base/src/main/java/com/youlai/common/constant/JwtClaimConstants.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/constant/JwtClaimConstants.java rename to youlai-common/common-base/src/main/java/com/youlai/common/constant/JwtClaimConstants.java diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/constant/MemberConstants.java b/youlai-common/common-base/src/main/java/com/youlai/common/constant/MemberConstants.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/constant/MemberConstants.java rename to youlai-common/common-base/src/main/java/com/youlai/common/constant/MemberConstants.java diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/constant/OrderConstants.java b/youlai-common/common-base/src/main/java/com/youlai/common/constant/OrderConstants.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/constant/OrderConstants.java rename to youlai-common/common-base/src/main/java/com/youlai/common/constant/OrderConstants.java diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/constant/ProductConstants.java b/youlai-common/common-base/src/main/java/com/youlai/common/constant/ProductConstants.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/constant/ProductConstants.java rename to youlai-common/common-base/src/main/java/com/youlai/common/constant/ProductConstants.java diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/constant/SecurityConstants.java b/youlai-common/common-base/src/main/java/com/youlai/common/constant/RedisConstants.java similarity index 59% rename from youlai-common/common-core/src/main/java/com/youlai/common/constant/SecurityConstants.java rename to youlai-common/common-base/src/main/java/com/youlai/common/constant/RedisConstants.java index 4d0e6218d..23835c9b8 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/constant/SecurityConstants.java +++ b/youlai-common/common-base/src/main/java/com/youlai/common/constant/RedisConstants.java @@ -1,6 +1,6 @@ package com.youlai.common.constant; -public interface SecurityConstants { +public interface RedisConstants { /** * 黑名单TOKEN Key前缀 @@ -13,20 +13,25 @@ public interface SecurityConstants { String CAPTCHA_CODE_PREFIX = "captcha_code:"; /** - * 短信验证码key前缀 + * 登录短信验证码key前缀 */ - String SMS_CODE_PREFIX = "sms_code:"; + String LOGIN_SMS_CODE_PREFIX = "sms_code:login"; /** - * Knife4j测试客户端ID(Knife4j自动填充的 access_token 须原生返回,不能被包装成业务码数据格式) + * 注册短信验证码key前缀 */ - String TEST_OAUTH2_CLIENT_ID = "client"; + String REGISTER_SMS_CODE_PREFIX = "sms_code:register"; - String JWK_SET_KEY = "jwk_set"; /** * 角色和权限缓存前缀 */ String ROLE_PERMS_PREFIX = "role_perms:"; + + /** + * JWT 密钥对(包含公钥和私钥) + */ + String JWK_SET_KEY = "jwk_set"; + } diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/constant/SystemConstants.java b/youlai-common/common-base/src/main/java/com/youlai/common/constant/SystemConstants.java similarity index 85% rename from youlai-common/common-core/src/main/java/com/youlai/common/constant/SystemConstants.java rename to youlai-common/common-base/src/main/java/com/youlai/common/constant/SystemConstants.java index a59b79f71..ddc7b831f 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/constant/SystemConstants.java +++ b/youlai-common/common-base/src/main/java/com/youlai/common/constant/SystemConstants.java @@ -4,14 +4,14 @@ package com.youlai.common.constant; * 系统常量 * * @author haoxr - * @since 2021/10/30 9:32 + * @since 2021/10/30 */ public interface SystemConstants { /** * 根部门ID */ - Long ROOT_NODE_ID = 0l; + Long ROOT_NODE_ID = 0L; /** diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/enums/DataScopeEnum.java b/youlai-common/common-base/src/main/java/com/youlai/common/enums/DataScopeEnum.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/enums/DataScopeEnum.java rename to youlai-common/common-base/src/main/java/com/youlai/common/enums/DataScopeEnum.java diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/enums/GenderEnum.java b/youlai-common/common-base/src/main/java/com/youlai/common/enums/GenderEnum.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/enums/GenderEnum.java rename to youlai-common/common-base/src/main/java/com/youlai/common/enums/GenderEnum.java diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/enums/MenuTypeEnum.java b/youlai-common/common-base/src/main/java/com/youlai/common/enums/MenuTypeEnum.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/enums/MenuTypeEnum.java rename to youlai-common/common-base/src/main/java/com/youlai/common/enums/MenuTypeEnum.java diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/enums/StatusEnum.java b/youlai-common/common-base/src/main/java/com/youlai/common/enums/StatusEnum.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/enums/StatusEnum.java rename to youlai-common/common-base/src/main/java/com/youlai/common/enums/StatusEnum.java diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/factory/NamedThreadFactory.java b/youlai-common/common-base/src/main/java/com/youlai/common/factory/NamedThreadFactory.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/factory/NamedThreadFactory.java rename to youlai-common/common-base/src/main/java/com/youlai/common/factory/NamedThreadFactory.java diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/result/IResultCode.java b/youlai-common/common-base/src/main/java/com/youlai/common/result/IResultCode.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/result/IResultCode.java rename to youlai-common/common-base/src/main/java/com/youlai/common/result/IResultCode.java diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/result/PageResult.java b/youlai-common/common-base/src/main/java/com/youlai/common/result/PageResult.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/result/PageResult.java rename to youlai-common/common-base/src/main/java/com/youlai/common/result/PageResult.java diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/result/Result.java b/youlai-common/common-base/src/main/java/com/youlai/common/result/Result.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/result/Result.java rename to youlai-common/common-base/src/main/java/com/youlai/common/result/Result.java diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/result/ResultCode.java b/youlai-common/common-base/src/main/java/com/youlai/common/result/ResultCode.java similarity index 100% rename from youlai-common/common-core/src/main/java/com/youlai/common/result/ResultCode.java rename to youlai-common/common-base/src/main/java/com/youlai/common/result/ResultCode.java diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/constant/ExcelConstants.java b/youlai-common/common-core/src/main/java/com/youlai/common/constant/ExcelConstants.java deleted file mode 100644 index 99714fec0..000000000 --- a/youlai-common/common-core/src/main/java/com/youlai/common/constant/ExcelConstants.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.youlai.common.constant; - -/** - * Excel 常量 - * - * @author: haoxr - * @date: 2023/03/24 - */ -public interface ExcelConstants { - - /** - * Excel 模板目录 - */ - String EXCEL_TEMPLATE_DIR="excel-templates"; - -} diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/constant/GlobalConstants.java b/youlai-common/common-core/src/main/java/com/youlai/common/constant/GlobalConstants.java deleted file mode 100644 index 45a3dbe87..000000000 --- a/youlai-common/common-core/src/main/java/com/youlai/common/constant/GlobalConstants.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.youlai.common.constant; - -/** - * 全局常量 - * - * @author haoxr - * @since 2021/10/30 9:32 - */ -public interface GlobalConstants { - - /** - * 全局状态-是 - */ - Integer STATUS_YES = 1; - - /** - * 超级管理员角色编码 - */ - String ROOT_ROLE_CODE = "ROOT"; - - /** - * [ {接口路径:[角色编码]},...] - */ - String URL_PERM_ROLES_KEY = "permission:url"; - - /** - * [{按钮权限标识:[角色编码]},...] - */ - String BTN_PERM_ROLES_KEY = "permission:btn"; - -} diff --git a/youlai-common/common-file/pom.xml b/youlai-common/common-file/pom.xml deleted file mode 100644 index e26ee5e90..000000000 --- a/youlai-common/common-file/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - youlai-common - com.youlai - 3.0.1 - - 4.0.0 - - common-file - - - 17 - 17 - - - - - - com.youlai - common-web - true - - - - io.minio - minio - - - - com.google.guava - guava - 32.0.1-jre - - - - - com.aliyun.oss - aliyun-sdk-oss - - - - \ No newline at end of file diff --git a/youlai-common/common-file/src/main/java/com/youlai/common/file/model/FileInfo.java b/youlai-common/common-file/src/main/java/com/youlai/common/file/model/FileInfo.java deleted file mode 100644 index 63d26c87d..000000000 --- a/youlai-common/common-file/src/main/java/com/youlai/common/file/model/FileInfo.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.youlai.common.file.model; - -import lombok.Data; - -@Data -public class FileInfo { - - private String name; - - private String url; - -} diff --git a/youlai-common/common-file/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/youlai-common/common-file/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 3e65b34e5..000000000 --- a/youlai-common/common-file/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1,3 +0,0 @@ -com.youlai.common.file.service.impl.MinioOssService -com.youlai.common.file.service.impl.AliyunOssService -com.youlai.common.file.controller.FileController \ No newline at end of file diff --git a/youlai-common/common-mybatis/pom.xml b/youlai-common/common-mybatis/pom.xml index d037a0d68..c073dae29 100644 --- a/youlai-common/common-mybatis/pom.xml +++ b/youlai-common/common-mybatis/pom.xml @@ -45,7 +45,7 @@ com.youlai - common-resourceserver + common-security true diff --git a/youlai-common/common-redis/pom.xml b/youlai-common/common-redis/pom.xml index 268b2e367..a1461de02 100644 --- a/youlai-common/common-redis/pom.xml +++ b/youlai-common/common-redis/pom.xml @@ -14,7 +14,7 @@ com.youlai - common-core + common-base diff --git a/youlai-common/common-resourceserver/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/youlai-common/common-resourceserver/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 1054047c2..000000000 --- a/youlai-common/common-resourceserver/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1,4 +0,0 @@ -com.youlai.common.security.service.PermissionService -com.youlai.common.security.config.ResourceServerConfig -com.youlai.common.security.exception.MyAccessDeniedHandler -com.youlai.common.security.exception.MyAuthenticationEntryPoint \ No newline at end of file diff --git a/youlai-common/common-sms/pom.xml b/youlai-common/common-sms/pom.xml deleted file mode 100644 index 1806a5fef..000000000 --- a/youlai-common/common-sms/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - youlai-common - com.youlai - 3.0.1 - - 4.0.0 - - common-sms - - - 17 - 17 - - - - - com.youlai - common-web - true - - - - com.youlai - common-redis - - - - com.aliyun - aliyun-java-sdk-core - - - - com.aliyun - aliyun-java-sdk-dysmsapi - - - - - - \ No newline at end of file diff --git a/youlai-common/common-sms/src/main/java/com/youlai/common/sms/config/AliyunSmsProperties.java b/youlai-common/common-sms/src/main/java/com/youlai/common/sms/config/AliyunSmsProperties.java deleted file mode 100644 index ab43accd7..000000000 --- a/youlai-common/common-sms/src/main/java/com/youlai/common/sms/config/AliyunSmsProperties.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.youlai.common.sms.config; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.Configuration; - -/** - * 阿里云短信配置 - *

- * 配置文件 youlai-common.yml - * - * @author haoxr - * @since 2021/10/13 22:44 - */ -@ConfigurationProperties(prefix = "aliyun.sms") -@Configuration -@Data -public class AliyunSmsProperties { - - private String accessKeyId; - - private String accessKeySecret; - - private String domain; - - private String regionId; - - private String templateCode; - - private String signName; - -} diff --git a/youlai-common/common-sms/src/main/java/com/youlai/common/sms/controller/SmsCodeController.java b/youlai-common/common-sms/src/main/java/com/youlai/common/sms/controller/SmsCodeController.java deleted file mode 100644 index 641b12cb7..000000000 --- a/youlai-common/common-sms/src/main/java/com/youlai/common/sms/controller/SmsCodeController.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.youlai.common.sms.controller; - -import com.youlai.common.result.Result; -import com.youlai.common.sms.service.AliyunSmsService; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Operation; -import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@Tag(name = "短信验证码") -@RestController -@RequestMapping("/sms-code") -@RequiredArgsConstructor -public class SmsCodeController { - - private final AliyunSmsService aliyunSmsService; - - @Operation(summary = "发送短信验证码") - @PostMapping - public Result sendSmsCode( - @Parameter(name = "手机号") String phoneNumber - ) { - boolean result = aliyunSmsService.sendSmsCode(phoneNumber); - return Result.judge(result); - } -} diff --git a/youlai-common/common-sms/src/main/resources/META-INF/spring.factories b/youlai-common/common-sms/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 68c3964f8..000000000 --- a/youlai-common/common-sms/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,4 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - com.youlai.common.sms.config.AliyunSmsProperties,\ - com.youlai.common.sms.service.AliyunSmsService, \ - com.youlai.common.sms.controller.SmsCodeController diff --git a/youlai-common/common-web/pom.xml b/youlai-common/common-web/pom.xml index c3d82a1d5..c0757624b 100644 --- a/youlai-common/common-web/pom.xml +++ b/youlai-common/common-web/pom.xml @@ -15,7 +15,7 @@ com.youlai - common-core + common-base @@ -66,7 +66,7 @@ com.youlai - common-resourceserver + common-security true diff --git a/youlai-common/pom.xml b/youlai-common/pom.xml index c9cf05637..7f765e800 100644 --- a/youlai-common/pom.xml +++ b/youlai-common/pom.xml @@ -15,15 +15,13 @@ common-apidoc - common-core + common-base common-redis common-web common-mybatis common-rabbitmq common-log - common-sms - common-file - common-resourceserver + common-security common-seata diff --git a/youlai-system/system-api/pom.xml b/youlai-system/system-api/pom.xml index 1e1ebadbd..393a5c3ba 100644 --- a/youlai-system/system-api/pom.xml +++ b/youlai-system/system-api/pom.xml @@ -15,7 +15,7 @@ com.youlai - common-core + common-base