From 97b1c3749e7d500b911585ed6b7ef9e5ce4724cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=A7=B0=E8=8D=A3?= <499967392@qq.com> Date: Wed, 18 Oct 2023 19:40:33 +0800 Subject: [PATCH] 1.0 --- .idea/.gitignore | 8 ++ .idea/compiler.xml | 76 +++++++++++ .idea/encodings.xml | 61 +++++++++ .idea/jarRepositories.xml | 20 +++ .idea/misc.xml | 12 ++ .idea/uiDesigner.xml | 124 ++++++++++++++++++ .idea/vcs.xml | 6 + planet-common/planet-core/pom.xml | 8 ++ .../planet/core/constant/ErrorCodeEnum.java | 4 + .../planet/core/model/anno/AllCheckNull.java | 14 ++ .../com/neon/planet/core/model/anno/Log.java | 11 ++ .../core/model/aop/AllCheckNullAspect.java | 114 ++++++++++++++++ .../neon/planet/core/model/aop/LogAspect.java | 99 ++++++++++++++ .../model/factory/ResponseResultFactory.java | 10 +- .../planet/core/model/utils/SystemUtils.java | 44 ++++++- .../planet/core/constant/ErrorCodeEnum.java | 98 -------------- .../core/exception/BusinessException.java | 24 ---- .../exception/CommonExceptionHandler.java | 44 ------- .../planet/core/model/domain/PageRespDto.java | 62 --------- .../planet/core/model/domain/RestResp.java | 81 ------------ .../planet/core/constant/ErrorCodeEnum.class | Bin 2589 -> 2659 bytes .../model/factory/ResponseResultFactory.class | Bin 2889 -> 3184 bytes .../planet/core/model/utils/SystemUtils.class | Bin 1891 -> 3176 bytes .../planet/core/constant/ErrorCodeEnum.class | Bin 2881 -> 0 bytes .../core/exception/BusinessException.class | Bin 1841 -> 0 bytes .../exception/CommonExceptionHandler.class | Bin 2619 -> 0 bytes .../core/model/domain/PageRespDto.class | Bin 1829 -> 0 bytes .../planet/core/model/domain/RestResp.class | Bin 2499 -> 0 bytes .../planet/rabbitmq/config/RabbitConfig.java | 29 ---- .../planet/rabbitmq/config/RabbitConfig.class | Bin 1505 -> 0 bytes .../com/xxxx/planet/redis/annotation/Key.java | 22 ---- .../xxxx/planet/redis/annotation/Lock.java | 30 ----- .../xxxx/planet/redis/aspect/LockAspect.java | 86 ------------ .../xxxx/planet/redis/config/CacheConfig.java | 94 ------------- .../planet/redis/constant/CacheConsts.java | 91 ------------- .../planet/redis/config/CacheConfig.class | Bin 5003 -> 4995 bytes .../constant/CacheConsts$CacheEnum.class | Bin 2011 -> 2205 bytes .../planet/redis/constant/CacheConsts.class | Bin 787 -> 961 bytes .../xxxx/planet/redis/annotation/Key.class | Bin 532 -> 0 bytes .../xxxx/planet/redis/annotation/Lock.class | Bin 707 -> 0 bytes .../xxxx/planet/redis/aspect/LockAspect.class | Bin 4778 -> 0 bytes .../planet/redis/config/CacheConfig.class | Bin 4999 -> 0 bytes .../constant/CacheConsts$CacheEnum.class | Bin 2011 -> 0 bytes .../planet/redis/constant/CacheConsts.class | Bin 787 -> 0 bytes .../xxxx/planet/security/auth/JwtUtils.java | 72 ---------- .../xxxx/planet/security/auth/UserHolder.java | 58 -------- .../security/config/InitPermissionRoles.java | 28 ---- .../planet/security/config/WebConfig.java | 38 ------ .../interceptor/TokenParseInterceptor.java | 91 ------------- .../xxxx/planet/security/auth/JwtUtils.class | Bin 3213 -> 0 bytes .../planet/security/auth/UserHolder.class | Bin 1873 -> 0 bytes .../security/config/InitPermissionRoles.class | Bin 686 -> 0 bytes .../planet/security/config/WebConfig.class | Bin 1791 -> 0 bytes .../interceptor/TokenParseInterceptor.class | Bin 2664 -> 0 bytes .../gateway/PlanetGatewayApplication.java | 20 --- .../gateway/config/PlanetCorsConfig.java | 35 ----- .../gateway/PlanetGatewayApplication.class | Bin 847 -> 0 bytes .../gateway/config/PlanetCorsConfig.class | Bin 1546 -> 0 bytes .../login/controller/LoginController.java | 106 +++++++-------- .../login/dao/entity/PrivacyPolicy.java | 34 ++--- .../login/dao/entity/UserAgreement.java | 34 ++--- .../login/dao/mapper/PrivacyPolicyMapper.java | 20 +-- .../login/dao/mapper/UserAgreementMapper.java | 20 +-- .../cache/PrivacyPolicyCacheManager.java | 99 +++++++------- .../cache/UserAgreementCacheManager.java | 101 +++++++------- .../planet/login/service/LoginService.java | 26 ++-- .../login/service/impl/LoginServiceImpl.java | 106 +++++++-------- .../target/classes/application-dev.yml | 2 +- .../controller/SendMessageController.class | Bin 2068 -> 2068 bytes .../com/xxxx/planet/test/feign/TestFeign.java | 43 ------ .../com/xxxx/planet/test/model/dto/User.java | 18 --- .../feign/TestFeign$TestFeignFallback.class | Bin 1279 -> 0 bytes .../xxxx/planet/test/feign/TestFeign.class | Bin 998 -> 0 bytes .../com/xxxx/planet/test/model/dto/User.class | Bin 1940 -> 0 bytes .../test/controller/TestController.java | 13 +- .../planet/test/PlanetTestApplication.java | 26 ---- .../test/controller/TestController.java | 68 ---------- .../xxxx/planet/test/dao/entity/NenoUser.java | 25 ---- .../planet/test/dao/mapper/NenoMapper.java | 13 -- .../manager/cache/UserInfoCacheManager.java | 49 ------- .../test/manager/feign/UserFeignManager.java | 30 ----- .../xxxx/planet/test/service/TestService.java | 19 --- .../test/service/impl/TestServiceImpl.java | 37 ------ .../src/main/resources/application-dev.yml | 4 +- .../target/classes/application-dev.yml | 4 +- .../test/controller/TestController.class | Bin 3660 -> 3830 bytes .../planet/test/PlanetTestApplication.class | Bin 1051 -> 0 bytes .../test/controller/TestController.class | Bin 3592 -> 0 bytes .../planet/test/dao/entity/NenoUser.class | Bin 2730 -> 0 bytes .../planet/test/dao/mapper/NenoMapper.class | Bin 403 -> 0 bytes .../manager/cache/UserInfoCacheManager.class | Bin 2191 -> 0 bytes .../test/manager/feign/UserFeignManager.class | Bin 1493 -> 0 bytes .../planet/test/service/TestService.class | Bin 378 -> 0 bytes .../test/service/impl/TestServiceImpl.class | Bin 1866 -> 0 bytes pom.xml | 7 + 95 files changed, 903 insertions(+), 1615 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/compiler.xml create mode 100644 .idea/encodings.xml create mode 100644 .idea/jarRepositories.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/uiDesigner.xml create mode 100644 .idea/vcs.xml create mode 100644 planet-common/planet-core/src/main/java/com/neon/planet/core/model/anno/AllCheckNull.java create mode 100644 planet-common/planet-core/src/main/java/com/neon/planet/core/model/anno/Log.java create mode 100644 planet-common/planet-core/src/main/java/com/neon/planet/core/model/aop/AllCheckNullAspect.java create mode 100644 planet-common/planet-core/src/main/java/com/neon/planet/core/model/aop/LogAspect.java delete mode 100644 planet-common/planet-core/src/main/java/com/xxxx/planet/core/constant/ErrorCodeEnum.java delete mode 100644 planet-common/planet-core/src/main/java/com/xxxx/planet/core/exception/BusinessException.java delete mode 100644 planet-common/planet-core/src/main/java/com/xxxx/planet/core/exception/CommonExceptionHandler.java delete mode 100644 planet-common/planet-core/src/main/java/com/xxxx/planet/core/model/domain/PageRespDto.java delete mode 100644 planet-common/planet-core/src/main/java/com/xxxx/planet/core/model/domain/RestResp.java delete mode 100644 planet-common/planet-core/target/classes/com/xxxx/planet/core/constant/ErrorCodeEnum.class delete mode 100644 planet-common/planet-core/target/classes/com/xxxx/planet/core/exception/BusinessException.class delete mode 100644 planet-common/planet-core/target/classes/com/xxxx/planet/core/exception/CommonExceptionHandler.class delete mode 100644 planet-common/planet-core/target/classes/com/xxxx/planet/core/model/domain/PageRespDto.class delete mode 100644 planet-common/planet-core/target/classes/com/xxxx/planet/core/model/domain/RestResp.class delete mode 100644 planet-common/planet-rabbitmq/src/main/java/com/xxxx/planet/rabbitmq/config/RabbitConfig.java delete mode 100644 planet-common/planet-rabbitmq/target/classes/com/xxxx/planet/rabbitmq/config/RabbitConfig.class delete mode 100644 planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/annotation/Key.java delete mode 100644 planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/annotation/Lock.java delete mode 100644 planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/aspect/LockAspect.java delete mode 100644 planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/config/CacheConfig.java delete mode 100644 planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/constant/CacheConsts.java delete mode 100644 planet-common/planet-redis/target/classes/com/xxxx/planet/redis/annotation/Key.class delete mode 100644 planet-common/planet-redis/target/classes/com/xxxx/planet/redis/annotation/Lock.class delete mode 100644 planet-common/planet-redis/target/classes/com/xxxx/planet/redis/aspect/LockAspect.class delete mode 100644 planet-common/planet-redis/target/classes/com/xxxx/planet/redis/config/CacheConfig.class delete mode 100644 planet-common/planet-redis/target/classes/com/xxxx/planet/redis/constant/CacheConsts$CacheEnum.class delete mode 100644 planet-common/planet-redis/target/classes/com/xxxx/planet/redis/constant/CacheConsts.class delete mode 100644 planet-common/planet-security/src/main/java/com/xxxx/planet/security/auth/JwtUtils.java delete mode 100644 planet-common/planet-security/src/main/java/com/xxxx/planet/security/auth/UserHolder.java delete mode 100644 planet-common/planet-security/src/main/java/com/xxxx/planet/security/config/InitPermissionRoles.java delete mode 100644 planet-common/planet-security/src/main/java/com/xxxx/planet/security/config/WebConfig.java delete mode 100644 planet-common/planet-security/src/main/java/com/xxxx/planet/security/interceptor/TokenParseInterceptor.java delete mode 100644 planet-common/planet-security/target/classes/com/xxxx/planet/security/auth/JwtUtils.class delete mode 100644 planet-common/planet-security/target/classes/com/xxxx/planet/security/auth/UserHolder.class delete mode 100644 planet-common/planet-security/target/classes/com/xxxx/planet/security/config/InitPermissionRoles.class delete mode 100644 planet-common/planet-security/target/classes/com/xxxx/planet/security/config/WebConfig.class delete mode 100644 planet-common/planet-security/target/classes/com/xxxx/planet/security/interceptor/TokenParseInterceptor.class delete mode 100644 planet-gateway/src/main/java/com/xxxx/planet/gateway/PlanetGatewayApplication.java delete mode 100644 planet-gateway/src/main/java/com/xxxx/planet/gateway/config/PlanetCorsConfig.java delete mode 100644 planet-gateway/target/classes/com/xxxx/planet/gateway/PlanetGatewayApplication.class delete mode 100644 planet-gateway/target/classes/com/xxxx/planet/gateway/config/PlanetCorsConfig.class delete mode 100644 planet-test/planet-test-api/src/main/java/com/xxxx/planet/test/feign/TestFeign.java delete mode 100644 planet-test/planet-test-api/src/main/java/com/xxxx/planet/test/model/dto/User.java delete mode 100644 planet-test/planet-test-api/target/classes/com/xxxx/planet/test/feign/TestFeign$TestFeignFallback.class delete mode 100644 planet-test/planet-test-api/target/classes/com/xxxx/planet/test/feign/TestFeign.class delete mode 100644 planet-test/planet-test-api/target/classes/com/xxxx/planet/test/model/dto/User.class delete mode 100644 planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/PlanetTestApplication.java delete mode 100644 planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/controller/TestController.java delete mode 100644 planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/dao/entity/NenoUser.java delete mode 100644 planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/dao/mapper/NenoMapper.java delete mode 100644 planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/manager/cache/UserInfoCacheManager.java delete mode 100644 planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/manager/feign/UserFeignManager.java delete mode 100644 planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/service/TestService.java delete mode 100644 planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/service/impl/TestServiceImpl.java delete mode 100644 planet-test/planet-test-service/target/classes/com/xxxx/planet/test/PlanetTestApplication.class delete mode 100644 planet-test/planet-test-service/target/classes/com/xxxx/planet/test/controller/TestController.class delete mode 100644 planet-test/planet-test-service/target/classes/com/xxxx/planet/test/dao/entity/NenoUser.class delete mode 100644 planet-test/planet-test-service/target/classes/com/xxxx/planet/test/dao/mapper/NenoMapper.class delete mode 100644 planet-test/planet-test-service/target/classes/com/xxxx/planet/test/manager/cache/UserInfoCacheManager.class delete mode 100644 planet-test/planet-test-service/target/classes/com/xxxx/planet/test/manager/feign/UserFeignManager.class delete mode 100644 planet-test/planet-test-service/target/classes/com/xxxx/planet/test/service/TestService.class delete mode 100644 planet-test/planet-test-service/target/classes/com/xxxx/planet/test/service/impl/TestServiceImpl.class diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..35410ca --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..59a2a0f --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..6d71741 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..712ab9d --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..d5cd614 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/planet-common/planet-core/pom.xml b/planet-common/planet-core/pom.xml index 4391004..a6524ac 100644 --- a/planet-common/planet-core/pom.xml +++ b/planet-common/planet-core/pom.xml @@ -46,5 +46,13 @@ 3.4.3 compile + + cn.hutool + hutool-all + + + org.springframework.boot + spring-boot-starter-aop + \ No newline at end of file diff --git a/planet-common/planet-core/src/main/java/com/neon/planet/core/constant/ErrorCodeEnum.java b/planet-common/planet-core/src/main/java/com/neon/planet/core/constant/ErrorCodeEnum.java index fface9e..e1f66a2 100644 --- a/planet-common/planet-core/src/main/java/com/neon/planet/core/constant/ErrorCodeEnum.java +++ b/planet-common/planet-core/src/main/java/com/neon/planet/core/constant/ErrorCodeEnum.java @@ -18,6 +18,10 @@ public enum ErrorCodeEnum { * 正确执行后的返回 */ OK(200, "成功"), + /** + * 参数为空 + */ + NULL(201, "xxx"), /** * 用户账号不存在 diff --git a/planet-common/planet-core/src/main/java/com/neon/planet/core/model/anno/AllCheckNull.java b/planet-common/planet-core/src/main/java/com/neon/planet/core/model/anno/AllCheckNull.java new file mode 100644 index 0000000..56507de --- /dev/null +++ b/planet-common/planet-core/src/main/java/com/neon/planet/core/model/anno/AllCheckNull.java @@ -0,0 +1,14 @@ +package com.neon.planet.core.model.anno; + +import java.lang.annotation.*; +import java.lang.reflect.Array; +import java.util.ArrayList; + +@Retention(RetentionPolicy.RUNTIME) +@Documented +@Target({ElementType.METHOD, ElementType.TYPE,ElementType.PARAMETER}) +public @interface AllCheckNull { + String params(); +} + + diff --git a/planet-common/planet-core/src/main/java/com/neon/planet/core/model/anno/Log.java b/planet-common/planet-core/src/main/java/com/neon/planet/core/model/anno/Log.java new file mode 100644 index 0000000..f683e39 --- /dev/null +++ b/planet-common/planet-core/src/main/java/com/neon/planet/core/model/anno/Log.java @@ -0,0 +1,11 @@ +package com.neon.planet.core.model.anno; + +import java.lang.annotation.*; + +@Target({ElementType.PARAMETER,ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface Log { + String value(); + String ref(); +} diff --git a/planet-common/planet-core/src/main/java/com/neon/planet/core/model/aop/AllCheckNullAspect.java b/planet-common/planet-core/src/main/java/com/neon/planet/core/model/aop/AllCheckNullAspect.java new file mode 100644 index 0000000..53bddd9 --- /dev/null +++ b/planet-common/planet-core/src/main/java/com/neon/planet/core/model/aop/AllCheckNullAspect.java @@ -0,0 +1,114 @@ +package com.neon.planet.core.model.aop; + +import cn.hutool.core.util.StrUtil; +import com.neon.planet.core.model.anno.AllCheckNull; +import com.neon.planet.core.model.factory.ResponseResultFactory; +import com.neon.planet.core.model.utils.SystemUtils; +import lombok.extern.slf4j.Slf4j; +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Before; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import java.lang.reflect.Field; +import java.util.*; + +@Aspect +@Component +//@SuppressWarnings({"unused"}) +@Slf4j +public class AllCheckNullAspect { + Logger logger; + + @Pointcut("@annotation(com.neon.planet.core.model.anno.AllCheckNull)") //自定义切点-->(作用于哪里) + public void annotationPointcut() { + } + + @Before("annotationPointcut()") //进入方法前的操作 + public void before(JoinPoint joinPoint) { + + } + + @Around(value = "annotationPointcut() && @annotation(allCheckNull) ", argNames = "joinPoint,allCheckNull") + public Object round(ProceedingJoinPoint joinPoint, AllCheckNull allCheckNull) throws Throwable { + logger = LoggerFactory.getLogger(String.valueOf(joinPoint.getSignature())); + MethodSignature signature = (MethodSignature) joinPoint.getSignature(); + + String notCheckNullParams = allCheckNull.params(); + String[] notCheckNullParamsArr = notCheckNullParams.split(","); + + logger.info("不判空的字段数组"+ Arrays.toString(notCheckNullParamsArr)); + + String[] paramsNameArr = signature.getParameterNames();//获取所有的参数名称 + Class[] paramsClassArr = signature.getParameterTypes(); + Object[] paramsValueArr = joinPoint.getArgs();//获取所有的参数值 + List> dataList = new ArrayList<>(); + for (int i = 0; i map = new HashMap<>(); + map.put("paramsName",paramsNameArr[i]); + map.put("paramsClass",paramsClassArr[i]); + map.put("paramsValue",paramsValueArr[i]); + dataList.add(map); + } + logger.info("请求参数数组"+dataList); + + for (Map data : dataList) { + if(!SystemUtils.haveValueInStringArr(notCheckNullParamsArr, (String) data.get("paramsName"))) { + /*该字段不在不判空的数组里面*/ + /*进行判空*/ + logger.info(String.valueOf(data.get("paramsClass"))); + + if(String.valueOf(data.get("paramsClass")).equals("class java.lang.String")&&SystemUtils.StringIsNull(String.valueOf(data.get("paramsValue")))) { + logger.info("参数"+data.get("paramsName")+"为字符串"); + logger.info("参数"+data.get("paramsName")+"为空"); + String msg = "参数"+ data.get("paramsName")+"不能为空"; + return ResponseResultFactory.isNull(msg); + }else if(String.valueOf(data.get("paramsClass")).equals("class java.lang.Integer")&&SystemUtils.NumIsNull((Integer) data.get("paramsValue"))) { + logger.info("参数"+data.get("paramsName")+"为数字"); + logger.info("参数"+data.get("paramsName")+"为空"); + String msg = "参数"+ data.get("paramsName")+"不能为空"; + return ResponseResultFactory.isNull(msg); + }else if(String.valueOf(data.get("paramsClass")).equals("class java.lang.Array")&&SystemUtils.arrIsNull(new Object[]{data.get("paramsValue")})) { + logger.info("参数"+data.get("paramsName")+"为数组"); + logger.info("参数"+data.get("paramsName")+"为空"); + String msg = "参数"+ data.get("paramsName")+"不能为空"; + return ResponseResultFactory.isNull(msg); + }else if(!String.valueOf(data.get("paramsClass")).equals("class java.lang.String")&&!String.valueOf(data.get("paramsClass")).equals("class java.lang.Integer")&&!String.valueOf(data.get("paramsClass")).equals("class java.lang.Array")) { + logger.info("参数"+data.get("paramsName")+"为对象"); + logger.info("参数"+data.get("paramsName")+"为空"); + String msg = "参数"+ data.get("paramsName")+"不能为空"; + + Field[] paramsValuesArr = data.get("paramsValue").getClass().getDeclaredFields(); +// try { + int num = 0; + for(Field field : paramsValuesArr) { + field.setAccessible(true); + logger.info("获取到的值"+ data.get("paramsValue")); + logger.info("获取到的参数"+field.get(data.get("paramsValue"))); + if(field.get(data.get("paramsValue"))==null) { + num++; + logger.info("参数"+ data.get("paramsName")+"的"+field.getName()+"为空"); + } + logger.info("for里面" + num); + } + logger.info("for外面" + num); + logger.info("长度" + paramsValuesArr.length); + if(num == paramsValuesArr.length) { + String msg3 = "参数"+ data.get("paramsName")+"为空"; + return ResponseResultFactory.isNull(msg3); + } +// }catch (IllegalAccessError e) { +// e.printStackTrace(); +// } + } + } + } + return joinPoint.proceed(); + } +} diff --git a/planet-common/planet-core/src/main/java/com/neon/planet/core/model/aop/LogAspect.java b/planet-common/planet-core/src/main/java/com/neon/planet/core/model/aop/LogAspect.java new file mode 100644 index 0000000..05aa169 --- /dev/null +++ b/planet-common/planet-core/src/main/java/com/neon/planet/core/model/aop/LogAspect.java @@ -0,0 +1,99 @@ +package com.neon.planet.core.model.aop; + +import com.neon.planet.core.model.anno.Log; +import lombok.extern.slf4j.Slf4j; +import org.aspectj.apache.bcel.classfile.ConstantNameAndType; +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; +import java.util.Arrays; +import java.util.Date; + +@Aspect +@Component +@Slf4j +public class LogAspect { + + Logger logger; + String logName; + String ref; + long begin; + long end; + //配置切入点 + //也就是说使用了@Log注解的目标方法,增强方法将会织入目标方法中 + @Pointcut(value = "@annotation(com.neon.planet.core.model.anno.Log)") + //在Pointcut我们还可以限制对哪个bean进行增强以及传入参数的限制 + //@Pointcut("execution()") + public void LogAop(){ + // 此方法无方法体,目的是为了让同类中其他方法使用此切入点 + } + + //在Pointcut我们还可以限制对哪个bean进行增强以及传入参数的限制 + //还可以搭配正则表达式使用,可定位到特定包下的某些方法,示例 + //多个匹配之间我们可以使用链接符 &&(且),||(或),!(非)来表示 + //下面这个切点的意思就是满足条件才会使用增强目标方法 + //且参数名为name + //且注入的bean为ALiangX + //该切点才会增强目标方法 +// @Pointcut("* execution(com.hecl.zhenghe.Controller.UserController.getUserInfo(String) && args(name) && bean(ALiangX))") +// public void LogAspect2(String name){ +// // 此方法无方法体,目的是为了让同类中其他方法使用此切入点 +// } + + @Before(value = "LogAop() && @annotation(log) ", argNames = "joinPoint,log") + public void doBefore(JoinPoint joinPoint, Log log){ + ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + assert servletRequestAttributes != null; + HttpServletRequest request = servletRequestAttributes.getRequest(); + logger.info(logName + "---开始"); + logger.info(logName + "---请求编号-----------》" + ref); + logger.info(logName + "---请求时间-----------》" + new Date()); + logger.info(logName + "---请求地址-----------》" + request.getRequestURI()); + logger.info(logName + "---请求类型-----------》" + request.getMethod()); + logger.info(logName + "---请求参数-----------》" + Arrays.toString(joinPoint.getArgs())); + } + + @After(value = "LogAop() && @annotation(log) ", argNames = "joinPoint,log") + public void doAfter(JoinPoint joinPoint, Log log){ + logger.info(logName + "---请求结束"); + //...这下面还可以执行其它的行为 + } + + @AfterReturning(pointcut = "LogAop()",returning = "object") + public void doAfterReturning(Object object){ + logger.info(logName + "---返回结果-----------》" + object); + } + + //在使用时,我们传入了 ProceedingJoinPoint 类型的参数, + //这个对象是必须要有的,并且需要调用 ProceedingJoinPoint 的 proceed() 方法 + //如果没有调用joinPoint.proceed()则会阻塞目标方法 + @Around(value = "LogAop() && @annotation(log) ", argNames = "joinPoint,log") + public Object doAround(ProceedingJoinPoint joinPoint, Log log) throws Throwable{ + logger = LoggerFactory.getLogger(String.valueOf(joinPoint.getSignature())); + logName = log.value(); + ref = log.ref(); + logger.info(logName + "---调用方法前先验证权限是否足够-----------》" + joinPoint); + begin = System.currentTimeMillis(); + Object result = joinPoint.proceed(); + /*获取结束时间*/ + end = System.currentTimeMillis(); + long time = end - begin; + logger.info(logName + "---结束"); + logger.info(logName + "---结束时间-----------》" + new Date()); + logger.info(logName + "---方法运行时间-----------》" + time + "ms"); + return result; + } + + @AfterThrowing(pointcut = "LogAop()",throwing = "e") + public void doAfterThrowing(Exception e){ + logger.info(logName + "---错误行为-----------》" + e); + } + +} diff --git a/planet-common/planet-core/src/main/java/com/neon/planet/core/model/factory/ResponseResultFactory.java b/planet-common/planet-core/src/main/java/com/neon/planet/core/model/factory/ResponseResultFactory.java index 7780eda..cc131b4 100644 --- a/planet-common/planet-core/src/main/java/com/neon/planet/core/model/factory/ResponseResultFactory.java +++ b/planet-common/planet-core/src/main/java/com/neon/planet/core/model/factory/ResponseResultFactory.java @@ -49,7 +49,7 @@ public class ResponseResultFactory { } /** - * 成功 + * 正常成功 * @param data * @param * @return @@ -58,6 +58,14 @@ public class ResponseResultFactory { return new ResponseResult(ErrorCodeEnum.OK.getCode(), ErrorCodeEnum.OK.getMsg(),data); } + /** + * 判空 + * @return + */ + public static ResponseResult isNull(String msg) { + return new ResponseResult(ErrorCodeEnum.NULL.getCode(), msg); + } + /** * 失败 * @param errorCode diff --git a/planet-common/planet-core/src/main/java/com/neon/planet/core/model/utils/SystemUtils.java b/planet-common/planet-core/src/main/java/com/neon/planet/core/model/utils/SystemUtils.java index 451141d..42a8f41 100644 --- a/planet-common/planet-core/src/main/java/com/neon/planet/core/model/utils/SystemUtils.java +++ b/planet-common/planet-core/src/main/java/com/neon/planet/core/model/utils/SystemUtils.java @@ -2,23 +2,37 @@ package com.neon.planet.core.model.utils; import lombok.extern.slf4j.Slf4j; +import java.lang.reflect.Array; +import java.util.List; +import java.util.Objects; + /*全局工具类*/ @Slf4j public class SystemUtils { /*判断是否为空对象*/ - public static boolean isNull(Object object) { + public static boolean objIsNull(Object object) { log.info("对象"+object); - return null == object; + return null == object || "{}" == object || object.equals(""); } /*判断是否不为空对象*/ - public static boolean isNoNull(Object object) { + public static boolean objIsNoNull(Object object) { log.info("对象"+object); return null != object; } + /*判断是否为空数组*/ + public static boolean arrIsNull(T[] arr) { + log.info("数组"+arr); + return null == arr || arr.length == 0; + } + /*判断是否不为空数组*/ + public static boolean arrIsNoNull(T[] arr) { + log.info("数组"+arr); + return null != arr && arr.length > 0; + } /*判断是否为空字符串*/ public static boolean StringIsNull(String str) { log.info("字符串"+str); - return null == str || str.trim().equals(""); + return null == str || str.trim().equals("") || str.length() == 0; } /*判断是否不是空字符串*/ public static boolean StringIsNoNull(String str) { @@ -36,4 +50,26 @@ public class SystemUtils { return null != num; } + /*判断是否是字符串*/ + public static boolean isString(T value) { + return value instanceof String; + } + /*判断是否是对象*/ + public static boolean isObject(T value) { + return value instanceof Object; + } + /*判断是否是数字串*/ + public static boolean isNumber(T value) { + return value instanceof Number; + } + /*判断某个字符串在不在某个字符串数组里面*/ + public static boolean haveValueInStringArr(String[] array, String targetValue) { + for (String value : array) { + if (Objects.equals(value, targetValue)) { + return true; + } + } + return false; + } + } \ No newline at end of file diff --git a/planet-common/planet-core/src/main/java/com/xxxx/planet/core/constant/ErrorCodeEnum.java b/planet-common/planet-core/src/main/java/com/xxxx/planet/core/constant/ErrorCodeEnum.java deleted file mode 100644 index 6aa8b04..0000000 --- a/planet-common/planet-core/src/main/java/com/xxxx/planet/core/constant/ErrorCodeEnum.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.xxxx.planet.core.constant; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 错误码枚举类 - * A 表示错误来源于用户,比如参数错误,用户安装版本过低,用户支付 超时等问题; - * B表示错误来源于当前系统,往往是业务逻辑出错,或程序健壮性差等问题; - * C 表示错误来源 于第三方服务(中间件等) - * @author : LJJ - * @date : 2023/9/21 18:18 - */ -@Getter -@AllArgsConstructor -public enum ErrorCodeEnum { - - /** - * 正确执行后的返回 - */ - OK("00000", "ok"), - - /** - * 用户端错误 - */ - USER_ERROR("A0001", "用户端错误"), - - /** - * 用户注册错误 - */ - USER_REGISTER_ERROR("A0100", "用户注册错误"), - - /** - * 用户验证码错误 - */ - USER_VERIFY_CODE_ERROR("A0101", "用户验证码错误"), - - /** - * 用户名已存在 - */ - USER_NAME_EXIST("A0111", "用户名已存在"), - - /** - * 用户账号不存在 - */ - USER_ACCOUNT_NOT_EXIST("A0201", "用户账号不存在"), - - /** - * 用户密码错误 - */ - USER_PASSWORD_ERROR("A0210", "用户密码错误"), - - /** - * 用户请求参数错误 - */ - USER_REQUEST_PARAM_ERROR("A0400", "用户请求参数错误"), - - /** - * 用户登录已过期 - */ - USER_LOGIN_EXPIRED("A0230", "用户登录已过期"), - - /** - * 访问未授权 - */ - USER_UN_AUTH("A0301", "访问未授权"), - - /** - * 系统执行出错 - */ - SYSTEM_ERROR("B0001", "系统执行出错"), - - /** - * 二级宏观错误码,系统执行超时 - */ - SYSTEM_TIMEOUT_ERROR("B0100", "系统执行超时"), - - /** - * 一级宏观错误码,调用第三方服务出错 - */ - THIRD_SERVICE_ERROR("C0001", "调用第三方服务出错"), - - /** - * 一级宏观错误码,中间件服务出错 - */ - MIDDLEWARE_SERVICE_ERROR("C0100", "中间件服务出错"); - - /** - * 错误码 - */ - private final String code; - - /** - * 中文描述 - */ - private final String message; - -} diff --git a/planet-common/planet-core/src/main/java/com/xxxx/planet/core/exception/BusinessException.java b/planet-common/planet-core/src/main/java/com/xxxx/planet/core/exception/BusinessException.java deleted file mode 100644 index 4cce87a..0000000 --- a/planet-common/planet-core/src/main/java/com/xxxx/planet/core/exception/BusinessException.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.xxxx.planet.core.exception; - -import com.xxxx.planet.core.constant.ErrorCodeEnum; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 自定义业务异常,用于处理用户请求时,业务错误时抛出 - * - * @author xiongxiaoyang - * @date 2022/5/11 - */ -@EqualsAndHashCode(callSuper = true) -@Data -public class BusinessException extends RuntimeException { - - private final ErrorCodeEnum errorCodeEnum; - - public BusinessException(ErrorCodeEnum errorCodeEnum) { - super(errorCodeEnum.getMessage(), null, false, false); - this.errorCodeEnum = errorCodeEnum; - } - -} diff --git a/planet-common/planet-core/src/main/java/com/xxxx/planet/core/exception/CommonExceptionHandler.java b/planet-common/planet-core/src/main/java/com/xxxx/planet/core/exception/CommonExceptionHandler.java deleted file mode 100644 index f4a9764..0000000 --- a/planet-common/planet-core/src/main/java/com/xxxx/planet/core/exception/CommonExceptionHandler.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.xxxx.planet.core.exception; - -import com.xxxx.planet.core.constant.ErrorCodeEnum; -import com.xxxx.planet.core.model.domain.RestResp; -import lombok.extern.slf4j.Slf4j; -import org.springframework.validation.BindException; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.RestControllerAdvice; - -/** - * 通用的异常处理器 - */ -@Slf4j -@RestControllerAdvice -public class CommonExceptionHandler { - - /** - * 处理数据校验异常 - */ - @ExceptionHandler(BindException.class) - public RestResp handlerBindException(BindException e) { - log.error(e.getMessage(), e); - return RestResp.fail(ErrorCodeEnum.USER_REQUEST_PARAM_ERROR); - } - - /** - * 处理业务异常 - */ - @ExceptionHandler(com.xxxx.planet.core.exception.BusinessException.class) - public RestResp handlerBusinessException(com.xxxx.planet.core.exception.BusinessException e) { - log.error(e.getMessage(), e); - return RestResp.fail(e.getErrorCodeEnum()); - } - - /** - * 处理系统异常 - */ - @ExceptionHandler(Exception.class) - public RestResp handlerException(Exception e) { - log.error(e.getMessage(), e); - return RestResp.error(); - } - -} diff --git a/planet-common/planet-core/src/main/java/com/xxxx/planet/core/model/domain/PageRespDto.java b/planet-common/planet-core/src/main/java/com/xxxx/planet/core/model/domain/PageRespDto.java deleted file mode 100644 index 162e20a..0000000 --- a/planet-common/planet-core/src/main/java/com/xxxx/planet/core/model/domain/PageRespDto.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.xxxx.planet.core.model.domain; - -import lombok.Getter; - -import java.util.List; - -/** - * 分页响应数据格式封装 - */ -@Getter -public class PageRespDto { - - /** - * 页码 - */ - private final long pageNum; - - /** - * 每页大小 - */ - private final long pageSize; - - /** - * 总记录数 - */ - private final long total; - - /** - * 分页数据集 - */ - private final List list; - - /** - * 该构造函数用于通用分页查询的场景 接收普通分页数据和普通集合 - */ - public PageRespDto(long pageNum, long pageSize, long total, List list) { - this.pageNum = pageNum; - this.pageSize = pageSize; - this.total = total; - this.list = list; - } - - public static PageRespDto of(long pageNum, long pageSize, long total, List list) { - return new PageRespDto<>(pageNum, pageSize, total, list); - } - - /** - * 获取分页数 - */ - public long getPages() { - if (this.pageSize == 0L) { - return 0L; - } else { - long pages = this.total / this.pageSize; - if (this.total % this.pageSize != 0L) { - ++pages; - } - return pages; - } - } - -} diff --git a/planet-common/planet-core/src/main/java/com/xxxx/planet/core/model/domain/RestResp.java b/planet-common/planet-core/src/main/java/com/xxxx/planet/core/model/domain/RestResp.java deleted file mode 100644 index 582d36f..0000000 --- a/planet-common/planet-core/src/main/java/com/xxxx/planet/core/model/domain/RestResp.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.xxxx.planet.core.model.domain; - - -import com.xxxx.planet.core.constant.ErrorCodeEnum; -import lombok.Getter; - -import java.util.Objects; - -/** - * Http Rest 响应工具及数据格式封装 - */ -@Getter -public class RestResp { - - /** - * 响应码 00000-没有错误 - */ - private String code; - - /** - * 响应消息 - */ - private String message; - - /** - * 响应数据 - */ - private T data; - - private RestResp() { - this.code = ErrorCodeEnum.OK.getCode(); - this.message = ErrorCodeEnum.OK.getMessage(); - } - - private RestResp(ErrorCodeEnum errorCode) { - this.code = errorCode.getCode(); - this.message = errorCode.getMessage(); - } - - private RestResp(T data) { - this(); - this.data = data; - } - - /** - * 业务处理成功,无数据返回 - */ - public static RestResp ok() { - return new RestResp<>(); - } - - /** - * 业务处理成功,有数据返回 - */ - public static RestResp ok(T data) { - return new RestResp<>(data); - } - - /** - * 业务处理失败 - */ - public static RestResp fail(ErrorCodeEnum errorCode) { - return new RestResp<>(errorCode); - } - - - /** - * 系统错误 - */ - public static RestResp error() { - return new RestResp<>(ErrorCodeEnum.SYSTEM_ERROR); - } - - /** - * 判断是否成功 - */ - public boolean isOk() { - return Objects.equals(this.code, ErrorCodeEnum.OK.getCode()); - } - -} diff --git a/planet-common/planet-core/target/classes/com/neon/planet/core/constant/ErrorCodeEnum.class b/planet-common/planet-core/target/classes/com/neon/planet/core/constant/ErrorCodeEnum.class index 898841e9fe2123a0278c73c206d41fa01046d81b..276c23bf6bf817f01a8ea0ee955c6228663bdcc4 100644 GIT binary patch delta 1297 zcmZvbNo*8X5QhKP(>?QM+{WF*7!xOii6H^J4T~4{EipL8?CY?GErcv=0pbM0fY}@r z0@4^cNJf?~2|@w^w(Jo`;3FV`;KCIo+-+ORg)4`Msxrt4qNVP?-d9y!^{QWAioJ-X z9{hXj4uCS83d6+u2sU722y;W&6hQ)CG2G0LExg>SF+PHA*sk$)gy0VLe4{Z@V<(&6 zYE07jj?M2i$~1mpbC*WB#%?zEXjEwIWpkfKrAGCSZ12~YtZ{(NgBnvbeqysuW2(l_ zZ2qD#P2&)ohc%{a{L1E$5K;=p;spvNX=NlVbJ5D$+8h1*0z>BT7UtSGiem~z>6u2+ zY8&%WZ({~#+L(peHkRUe2qzeyR0#SF=e;v6Oqbahj|mEay1F_W6WPq|ZM^I^boRCX z<(=#7$(;4B{^>PewlN74($CGjKpE*PGe5tagLC?>-R*C><~LvQ|7h?p9k)?I?oul+ zP)S;C#VaRsShTmTtGBDgJ6G>txbEGq_c9q9Q~u-efBUPljh9+fcF8A(k4WyUs38;l=>B= z21ThsQEE_>+7YGVqEuXz>QIF!4^x!p2{`$nvC}%3LKvUp3n*04vVfGY$W5pY7~Ke5 zr-p*@)@x)AN+BLD<0anmG0}dTc2P-Mfz$$30#+rfNR4dJjE|u(pnT&=5F79P$ zL|L7%+mOw$Dmuh;ai3|9P)9;t%f&;6QGr7R#)2*$G0YV>OkiHf#pCo#Jv4riO>R}qa5w3Ql_JYek$}cC+w;O(=kHF3LWP}Tw@K> zLZL-WW6@$K%QcdWO9YoXcKTSjW<%1+x{1=|ZBRFO7;+{mkWF?BxfqT@jGze?U0JJUYGu&rG2YBMiM5n(VBKqRM(IER delta 1194 zcmZuwSx*yD6#iz~X>aR@(^{fbB`7Y)R+eI25J42h1q*KAzJcPt?^2>MqA@NhgqT2x zPZ}QxPy-F1@NA;d7hg3o9U$>1sPUXz4M?11?sx8Y&UfbAbI*M9w0lDDe)Ycv;76ka zR#ZDtgI#tM*|FP+OzdHDFE9IeyI&y7i32z&aL7sIVfGvm@CnqiStpPqaFoqs0=WY9 zY#tZL6F9-+pN>-8)Ugc9b*w<4j?K7bM+4I#1vazkN$f!fvlTkB zkRASN^;&#{Kdmz=bC9hdaisaB+0-}kY#{cgCDzw7I&{x$BSkJdr;TL{4t ziEBrD@0zW>I+l=jP)o4{2)}4v%TmH0S|pT7SCvql#FYbtRJlZ|Tp|@Ik*bnNHAtiy zB+?fpQhte)Un1qF%x-R*MCu%1ctH)Oy$uemLNSyON@zO|3ax;%2TCv0VOY9or(iX$ zHtEwzP>MBBWxSt|6;8J`Jqm3YR*qNyiC;^M9*;s9e;n)R)fAL9a_aRcr?n(RoR197 zrlr4zZE~V=j3?5tL7qy%Mr>mBB(Z(6xZ*!zl_v!jDGnm+7s++w$DAq!Ddgtf#lQBq zi*b(oXq88CS+T_cg7hwfL8ED)l4L5XAg~qN;sq*=)IoZb!f;e1XS|P6)28)7kH8p! zwZ`qzT=>AGTawcy>9M)+F|0T|nV;A-Q@WC*%PU+;CX=%yIa`u*44X^I3YRz%gW2qx zD}D2%FV!H0kJT_D+ohQp;+GrLH#X_8%RI9+NDv+0t}Fs6hD9UH15P`ddH@`Cf| xS^*Cdk%V+4(;TJJVbf4gGu%KwRWtnsuW0Iq$@7^;<~zl!e_FF0J4mZy=Wn6G(h~px diff --git a/planet-common/planet-core/target/classes/com/neon/planet/core/model/factory/ResponseResultFactory.class b/planet-common/planet-core/target/classes/com/neon/planet/core/model/factory/ResponseResultFactory.class index e4787561cfc5c30f726da2e7e0260db654cafbff..8dcfce1dc2025b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9KvDp5|5wIABK3` zxrER+NRPfCoUB1s96>9cx6!W# zp^ia@qhiVET=2HU2~sJvM<8`e8{#|4;yc%a*e>bY1+jh74-oOe0C8u4xH{<`?@6ToQ|$U( z7rT{s+p2ie=<)?u^QOysPwkO+r(z!`-i}@KD(GIHjP`PCQ{yG$D@c4sNK6M!Cs}Vg Lggs5W5PJRry^3~@ diff --git a/planet-common/planet-core/target/classes/com/xxxx/planet/core/constant/ErrorCodeEnum.class b/planet-common/planet-core/target/classes/com/xxxx/planet/core/constant/ErrorCodeEnum.class deleted file mode 100644 index a29c566fe582978213bc432572ea4768ed313b01..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2881 zcmb7FSyxk66#gz`IK&HtqgaQw4#f&sMHE{H9AbzV4GHE3G^G_|j2I1x4Z+&kp^n9& ztz(N-JE+SEjRRJe)#pC;H;@qiKp(rh&&iE~@WNe-`?0_CoxS(jXYZT8|9koufErvc zfB`WJcHn$3t?uo@kLOo&&fF!wOn89rs$Ya!}0!GF%+VEBUJOJRM*u!iAlhHr$m zkD;DnKf?iG9b{O`@GZk3VI5|0G8|zzDy(A+>lltRd?&0fhV=|57)}c76oZT5G{g78 z`hlT=;YWru!aB>~W;n-iURW0xJPa2ZeiGKt42=xk43~uU3&RG6%M4e9b=8bt736u= zE12sF#@eg)(o?lN5{QNpRl!(1M6YN^A`nefIpXnH+#cH&azs1ZmnpC`X%26z!|U~U z6^xgL*HQ1(e6QGvl5KW)oooE9c2AunCoh%@Zd(H}n`n!Itkh<=dz#$7R=3BOTgZBD zv}xK#kGC%8V3HnhLz6@EwKm$kwuamimrE{Bz0*xT8l7H8odQ*oP3~4(lW#4VnxFD~ zxn+WG`kW08PZNdK59M3yq>yyXW~cpS?vomvb#*SsMw{31`jR0?t2JnI|aqAa5UuZ zY~LD+`vO}dA|L70vt5C$d}QVoV@#2|V!=S9IS>yE?|KMBG|*0wtPP>Wj@Y)wK%C4( zC{714w}lef#3qzijEt_pkk}C>orQD_xeA(U!_jbJg@UD{Bav~>k=0w%6 zvPtzE9ujDsuBZ|DPReGJ>FG`1Kae_gAbs{;E}``~PYX$>ha0%qmwI-Va>_hElJ35& z!ljEA%GzY^J|8@PH{E?Ree!7f(m@psa(Q*ObbR1J-$38x^s(!it6ixhPbrWJx318u zH$;(nd?PzV?SFD-@chI6 zzQ@Bw8-%Fn)h9~yCEaf@5{puc4Ie|#)}5hXg4%G=&>65t0v#R8hP1Z+l^Z(1`me;q zq5E{1v!Z!bHU0Rkrr+C=Rg*=30ff{@5~*DzQb$OndzVO8E0HcxB3+O~x&w(+Y>8A- ziBvd=R27MIaEi!9!%L)|2dq=X0FiA%0XAY26!^)SNhlsm63S!by+HmwvJ`wsZ^faCHqNLe0a>dPZqPzx(BbFGj-3qkPpBGm8)>yGax(kD0Cw66zt=yu@(xbHW z!Qkfw`P{uk|>qLL=%65Pm;uBNlY>Gshkc%KHieV z+l)`+(gYc=!Pyj(IBlBu*ZK8L?2nYoggXD#4We7>0beYcC6ZZcRrxYrE1BhzSz#^YEBPwP*sMj*=-l~96l#7$5+$17 zm_(`OHzhGy^P7`+OY^fNW@vsZQL_k$s~{k9EQPadNG1I=IP#sB~S diff --git a/planet-common/planet-core/target/classes/com/xxxx/planet/core/exception/BusinessException.class b/planet-common/planet-core/target/classes/com/xxxx/planet/core/exception/BusinessException.class deleted file mode 100644 index 73f9473a760985a32237d270a0b86dfcb340d89f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1841 zcmb7EU2hvz5Ixts>)kjT*ZFb@xJ_vb_#^I?5JB_1y5b!1et9@+>?QP-R+yb2Zm< zwtMY8CwO4*wP=~E`3<}E&<ufY~ppiA#i>i)ke>4?K^?Yc30ri z8BF<8eOWiLg-_)2DJdgE4#b$WpD<#Chbng@%H&BCwQN2R7?r`b?W}{NROn8036@P ztNdPM_*vmd%f3-cQl7^G5?G{GheipQEtdKaLQ#&8D3*SP@*|B2WVxoHa9zMO9Wu0> zr9OR`TqCelxldV-WH&#?G6}FP(EwG4=ToQghRNn6kn?X6DkA`#3iq QGd&VBH;j3GkonDj0hFGKH~;_u diff --git a/planet-common/planet-core/target/classes/com/xxxx/planet/core/exception/CommonExceptionHandler.class b/planet-common/planet-core/target/classes/com/xxxx/planet/core/exception/CommonExceptionHandler.class deleted file mode 100644 index 50d813731f9fec24008414492b7b1f0cf1604c67..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2619 zcmcImYg5}s6g>+VVIjgJm?V8Aq)B5SVQC6Y8&ewNnmlR;Vgp~&87j+*5tX%!Bt!bI z+H|I+{m>uKAJyqy$r#78bmDfR8A-dV`#ATWy?6E3-+%lGU>Q{tW4M>bC>Bj{EREt* z+)v{(ESp%t=O!LtNj<(W@ueEA;Guz>iB)`MV2xqWlMRNck_;L=^!Aqzc}X@JBFHfe zue!b)DVgltF2hhk)&;|O$@RtaRz&UG-(?f1M}g}%_5-^q zPGs-{Kej!$ZpRkiP{_^c0W>KVkJn|>c70wEVMO;4#mp$4#r`}nOq4}*AnRMUf)j~= z;!aoHhHpo$fb9A25b|p2&_1>~rMAI$rCZOfQ4rTEEkAObV%H5_VkGbTGKzCUz#eLY zI}tTrqeOGNBg;EUKj$PxX>L(OSI@XL1G6eyfg?6tRr>Gi%Xd+2N`|$! z-fOA?3(}7Q=~4CP>&LDmauy~qY2gya4Sa3k5%LDsEfnyLfue;CJT~ye!c#mm@U4Xs z$_AdR@0$!O|EcX5*s|~f6)NfTvf8X23MXQ?8@I@}>^lr*Lquh&4ZA^kn$FI3F;xRV3_Y_vaQf%V*4PFC#v1%RBK+)M(apFjBG#RMP*WT@1oyoQuXds zin#Y$z9!oH_3ExjcQU|#E3+g#}Y*|%Mf;pGLDc!85X8~BnI z(Z6&bVu6_INf9T$w1zGK$#D66!*r^ej*^S)Xj4Q9z0$iQHf$%7!H;yJ5X$6eX1LwG zISQT~hSWfMHFKDyzk)IPOJI0URS}I+G^V1W=M>F2y_s5_{|)SC8Vuk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xx/planet/core/model/domain/RestResp.class b/planet-common/planet-core/target/classes/com/xxxx/planet/core/model/domain/RestResp.class deleted file mode 100644 index 678bd1d3b7bdc4139cc451c4bc5ac2db59933f4f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2499 zcmcImU31e$6g_hM5i7!gi$iHCi3t?j0YpkaC~-q57$`VNC-!6p`p{8qVFb37%5tau zPkm^argYkw{(%0dPS4fKj+}^@_yNy&cXfB~IrrSVSN6aE{q+xkPqC>ZhcC0Zja8jP zHH$31lGU25?&uu2o5gwtcje)08ScsX`#NfPkikO@$(Gx;HRS6rtsgD3YxO&3!}pwi zXH`R{XAcHehug`v8jIr{53w7$~$zv7f_t6 zJAHd|*xR+ernTD*NZppz-LX7Joi9_>xrsbf7n|UjahqS z(r|4mZw;q5Z2yJZ{?_uWp6%Nn)fY;UdW4x4nskXF$|B*u(r~?0j;DHCme!|os77Mg zah-OMoAtQJri-FpZQhPRhw|0}X;UDLs+D|hIb99kOuzz86-qLR|ydx%+wDJXM%MBbKGIdXnCI&i%%NobCoyHDzB0F12g+b zs#R(q>EF0HgL547NOHWuae-8ebT8rqS_}n%4{@GPA5B;;@JZ+vI0{{dbAodrpj!^f zILA>fk?IoRFEjR!1FCuD98wX6VH8P!Kw99QkY40BrEy#FFHwW=?}q$3`7@Q}eas%{ z%kd0QCTWGqT#gXxV?tdnQ%IF-~aZ`0sZnq+}$OchHYax~bJ&wdyCQF54ReEk7 zVwn?`L?pO76D*SaG3FwdO7B%-UK{I`)XQg1B7Y6z4Fc4tmU}X4u4#kScQ9+v*4x#_i!5X5xCS5II$==zFlJA n(ud*B9uw{+|5vH&5shy4Fx>fL!Ko^IMnJXt9A8jw0=NDLXNUIO diff --git a/planet-common/planet-rabbitmq/src/main/java/com/xxxx/planet/rabbitmq/config/RabbitConfig.java b/planet-common/planet-rabbitmq/src/main/java/com/xxxx/planet/rabbitmq/config/RabbitConfig.java deleted file mode 100644 index ab7946f..0000000 --- a/planet-common/planet-rabbitmq/src/main/java/com/xxxx/planet/rabbitmq/config/RabbitConfig.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.xxxx.planet.rabbitmq.config; - -import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory; -import org.springframework.amqp.rabbit.connection.ConnectionFactory; -import org.springframework.amqp.rabbit.listener.RabbitListenerContainerFactory; -import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * RabbitMQ 配置类 - * @author : LJJ - * @date : 2023/9/23 21:18 - */ -@Configuration -public class RabbitConfig { - - /** - * 消息序列化配置 - */ - @Bean - public RabbitListenerContainerFactory rabbitListenerContainerFactory(ConnectionFactory connectionFactory) { - SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); - factory.setConnectionFactory(connectionFactory); - factory.setMessageConverter( new Jackson2JsonMessageConverter()); - return factory; - } - -} diff --git a/planet-common/planet-rabbitmq/target/classes/com/xxxx/planet/rabbitmq/config/RabbitConfig.class b/planet-common/planet-rabbitmq/target/classes/com/xxxx/planet/rabbitmq/config/RabbitConfig.class deleted file mode 100644 index 98b6d6d14d502f44236df4a1480da18a2de05443..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1505 zcmd5+YflqF6g^W~3Z+VUC=Zo~&$d=3F~%@kFyGtP1nEm~@*e zV3@0T#^-x<@m5o4>9`g3x^n&w_l(|94Za%XOHop0nCi?|RN$nRmg-K>f_7PW&e#tO zAM+Js8$4)Pr5hVo`0~B6+g$iNt(ZGx*3xszXioU}F(xP%E`&GZwPR^#Ng=UA$15G_ zTey(_7<7s}hV;g-zgq2vD)ewo`K_kxIC+lTTvfVFv;Ibet~qIGfBM%{Lkriow2z-I zi?j2^1u}PHwXL1Y<3zZrB>T~+&XBQA?l~@wUggiF(8QHlGi~e1Wfk`8 z(C;lbwUD)Nj($Y5a z72$0MMn7JmP?bR-8j@soCbP(+z)<>^W5|#TUEy?K8~k;Bi_Q|mXdoT2{&|`h7XP2n8Q_i z&URkFAaayZ&tMqI2)vFSx`D|njB&~* yC{9M~GaZJQowzW9QCg*s5Z7>>&|`#4kux-m(=S2bNg6|mH=_Jz6mK0>r+}YWZOoeh diff --git a/planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/annotation/Key.java b/planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/annotation/Key.java deleted file mode 100644 index 51514df..0000000 --- a/planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/annotation/Key.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.xxxx.planet.redis.annotation; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -/** - * 分布式锁-Key 注解 - * @author : LJJ - * @date : 2023/9/21 18:10 - */ -@Documented -@Retention(RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER}) -public @interface Key { - - String expr() default ""; - -} diff --git a/planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/annotation/Lock.java b/planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/annotation/Lock.java deleted file mode 100644 index c73d5c8..0000000 --- a/planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/annotation/Lock.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.xxxx.planet.redis.annotation; - -import com.xxxx.planet.core.constant.ErrorCodeEnum; - -import java.lang.annotation.Documented; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -/** - * 分布式锁 注解 - * @author : LJJ - * @date : 2023/9/21 18:10 - */ -@Documented -@Retention(RUNTIME) -@Target(METHOD) -public @interface Lock { - - String prefix(); - - boolean isWait() default false; - - long waitTime() default 3L; - - ErrorCodeEnum failCode() default ErrorCodeEnum.OK; - -} diff --git a/planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/aspect/LockAspect.java b/planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/aspect/LockAspect.java deleted file mode 100644 index 325cdfc..0000000 --- a/planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/aspect/LockAspect.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.xxxx.planet.redis.aspect; - -import com.xxxx.planet.redis.annotation.Key; -import com.xxxx.planet.redis.annotation.Lock; -import com.xxxx.planet.core.exception.BusinessException; -import lombok.RequiredArgsConstructor; -import lombok.SneakyThrows; -import org.aspectj.lang.ProceedingJoinPoint; -import org.aspectj.lang.annotation.Around; -import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.reflect.MethodSignature; -import org.redisson.api.RLock; -import org.redisson.api.RedissonClient; -import org.springframework.expression.Expression; -import org.springframework.expression.ExpressionParser; -import org.springframework.expression.common.TemplateParserContext; -import org.springframework.expression.spel.standard.SpelExpressionParser; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; - -import java.lang.reflect.Method; -import java.lang.reflect.Parameter; -import java.util.concurrent.TimeUnit; - -/** - * 分布式锁 切面 - * - * @author xiongxiaoyang - * @date 2022/6/20 - */ -@Aspect -@Component -@RequiredArgsConstructor -public class LockAspect { - - private final RedissonClient redissonClient; - - private static final String KEY_PREFIX = "Lock"; - - private static final String KEY_SEPARATOR = "::"; - - @Around(value = "@annotation(com.xxxx.planet.redis.annotation.Lock)") - @SneakyThrows - public Object doAround(ProceedingJoinPoint joinPoint) { - MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature(); - Method targetMethod = methodSignature.getMethod(); - Lock lock = targetMethod.getAnnotation(Lock.class); - String lockKey = KEY_PREFIX + buildLockKey(lock.prefix(), targetMethod, - joinPoint.getArgs()); - RLock rLock = redissonClient.getLock(lockKey); - if (lock.isWait() ? rLock.tryLock(lock.waitTime(), TimeUnit.SECONDS) : rLock.tryLock()) { - try { - return joinPoint.proceed(); - } finally { - rLock.unlock(); - } - } - throw new BusinessException(lock.failCode()); - } - - private String buildLockKey(String prefix, Method method, Object[] args) { - StringBuilder builder = new StringBuilder(); - if (StringUtils.hasText(prefix)) { - builder.append(KEY_SEPARATOR).append(prefix); - } - Parameter[] parameters = method.getParameters(); - for (int i = 0; i < parameters.length; i++) { - builder.append(KEY_SEPARATOR); - if (parameters[i].isAnnotationPresent(Key.class)) { - Key key = parameters[i].getAnnotation(Key.class); - builder.append(parseKeyExpr(key.expr(), args[i])); - } - } - return builder.toString(); - } - - private String parseKeyExpr(String expr, Object arg) { - if (!StringUtils.hasText(expr)) { - return arg.toString(); - } - ExpressionParser parser = new SpelExpressionParser(); - Expression expression = parser.parseExpression(expr, new TemplateParserContext()); - return expression.getValue(arg, String.class); - } - -} diff --git a/planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/config/CacheConfig.java b/planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/config/CacheConfig.java deleted file mode 100644 index 0a35773..0000000 --- a/planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/config/CacheConfig.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.xxxx.planet.redis.config; - -import com.github.benmanes.caffeine.cache.Caffeine; -import com.xxxx.planet.redis.constant.CacheConsts; -import lombok.var; -import org.springframework.cache.CacheManager; -import org.springframework.cache.caffeine.CaffeineCache; -import org.springframework.cache.support.SimpleCacheManager; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Primary; -import org.springframework.data.redis.cache.RedisCacheConfiguration; -import org.springframework.data.redis.cache.RedisCacheManager; -import org.springframework.data.redis.cache.RedisCacheWriter; -import org.springframework.data.redis.connection.RedisConnectionFactory; - -import java.time.Duration; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -/** - * 缓存配置类 - */ -@Configuration -public class CacheConfig { - - /** - * Caffeine 缓存管理器 - */ - @Bean - @Primary - public CacheManager caffeineCacheManager() { - System.out.println("初始化本地缓存管理"); - - SimpleCacheManager cacheManager = new SimpleCacheManager(); - - List caches = new ArrayList<>(CacheConsts.CacheEnum.values().length); - // 类型推断 var 非常适合 for 循环,JDK 10 引入,JDK 11 改进 - for (var c : CacheConsts.CacheEnum.values()) { - if (c.isLocal()) { - Caffeine caffeine = Caffeine.newBuilder().recordStats() - .maximumSize(c.getMaxSize()); - if (c.getTtl() > 0) { - caffeine.expireAfterWrite(Duration.ofSeconds(c.getTtl())); - } - caches.add(new CaffeineCache(c.getName(), caffeine.build())); - } - } - - cacheManager.setCaches(caches); - return cacheManager; - } - - /** - * Redis 缓存管理器 - */ - @Bean - public CacheManager redisCacheManager(RedisConnectionFactory connectionFactory) { - System.out.println("初始化redis缓存管理"); - - RedisCacheWriter redisCacheWriter = RedisCacheWriter.nonLockingRedisCacheWriter( - connectionFactory); - - RedisCacheConfiguration defaultCacheConfig = RedisCacheConfiguration.defaultCacheConfig() - .disableCachingNullValues().prefixCacheNameWith(CacheConsts.REDIS_CACHE_PREFIX); - - Map cacheMap = new LinkedHashMap<>( - CacheConsts.CacheEnum.values().length); - // 类型推断 var 非常适合 for 循环,JDK 10 引入,JDK 11 改进 - for (var c : CacheConsts.CacheEnum.values()) { - if (c.isRemote()) { - if (c.getTtl() > 0) { - cacheMap.put(c.getName(), - RedisCacheConfiguration.defaultCacheConfig().disableCachingNullValues() - .prefixCacheNameWith(CacheConsts.REDIS_CACHE_PREFIX) - .entryTtl(Duration.ofSeconds(c.getTtl()))); - } else { - cacheMap.put(c.getName(), - RedisCacheConfiguration.defaultCacheConfig().disableCachingNullValues() - .prefixCacheNameWith(CacheConsts.REDIS_CACHE_PREFIX)); - } - } - } - - RedisCacheManager redisCacheManager = new RedisCacheManager(redisCacheWriter, - defaultCacheConfig, cacheMap); - redisCacheManager.setTransactionAware(true); - redisCacheManager.initializeCaches(); - return redisCacheManager; - } - -} diff --git a/planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/constant/CacheConsts.java b/planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/constant/CacheConsts.java deleted file mode 100644 index 087bb21..0000000 --- a/planet-common/planet-redis/src/main/java/com/xxxx/planet/redis/constant/CacheConsts.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.xxxx.planet.redis.constant; - -/** - * 缓存相关常量 - * @author : LJJ - * @date : 2023/9/21 18:10 - */ -public class CacheConsts { - - /** - * 本项目 Redis 缓存前缀 - */ - public static final String REDIS_CACHE_PREFIX = "Cache::Planet::"; - - /** - * Caffeine 缓存管理器 - */ - public static final String CAFFEINE_CACHE_MANAGER = "caffeineCacheManager"; - - /** - * Redis 缓存管理器 - */ - public static final String REDIS_CACHE_MANAGER = "redisCacheManager"; - - /** - * 用户信息缓存 - */ - public static final String USER_INFO_CACHE_NAME = "userInfoCache"; - - /** - * 图片 验证码缓存 KEY - */ - public static final String IMG_VERIFY_CODE_CACHE_KEY = - REDIS_CACHE_PREFIX + "imgVerifyCodeCache::"; - - /** - * 缓存配置常量 - */ - public enum CacheEnum { - - USER_INFO_CACHE(2, USER_INFO_CACHE_NAME, 60 * 60 * 24, 10000), - - ; - - /** - * 缓存类型 0-本地 1-本地和远程 2-远程 - */ - private int type; - /** - * 缓存的名字 - */ - private String name; - /** - * 失效时间(秒) 0-永不失效 - */ - private int ttl; - /** - * 最大容量 - */ - private int maxSize; - - CacheEnum(int type, String name, int ttl, int maxSize) { - this.type = type; - this.name = name; - this.ttl = ttl; - this.maxSize = maxSize; - } - - public boolean isLocal() { - return type <= 1; - } - - public boolean isRemote() { - return type >= 1; - } - - public String getName() { - return name; - } - - public int getTtl() { - return ttl; - } - - public int getMaxSize() { - return maxSize; - } - - } - -} diff --git a/planet-common/planet-redis/target/classes/com/neon/planet/redis/config/CacheConfig.class b/planet-common/planet-redis/target/classes/com/neon/planet/redis/config/CacheConfig.class index 245f3519a0bb3a1fb03261a240b9ab48d594e7ec..41dcfd7c23662255372420b3f85a2ba5533ea354 100644 GIT binary patch delta 20 bcmeBHZ&u&%h@G81ASW>|wPf>0_F3EjPlN}! delta 28 jcmZox?^fUNh@GF`IWajS)ygU$CowOz#A@?P_F3Ejkz)!% diff --git a/planet-common/planet-redis/target/classes/com/neon/planet/redis/constant/CacheConsts$CacheEnum.class b/planet-common/planet-redis/target/classes/com/neon/planet/redis/constant/CacheConsts$CacheEnum.class index e7725194d8fa20e49c2c104e73ab280f01c89981..e328a4b2d6e24774da80c289aef2a65dd800b27d 100644 GIT binary patch literal 2205 zcmbVM-BTM?6#s2Dn{1W^LRvlrij>+UXk!&=3ltM$C|kovSw5QT3@)23Y)y8V-3=r9 z(g*($#|K}0P%75Z(dn~)l;b&@v`q_)9g?~C+qPoMEr=4naBfQ)4k!o9}|?N?a2Dq~p2JzlQK7?Gj#ay^a> z0o@yVX>D6uURc>K7K)1{0g0kv?pY+);dqXM#T{w`EZ@H4)mViQ{errzB1<%?30#eEgmP*E|8ODe|jwu*6HUB)G%xZzu# z<~(#mq->Z|F@U!O^!tZ?VAW^Xps?#%R^4)f8M~@txczwFvkwgOaMi8Z=3#g|!pB`N zUu5(9AelASAxd5?*UHW#%M6INkJ@`K{EE!B)ui>P+Y8N6$*-^7uVqGUnZHh-t$zA2 z%K1UQ4nUG{hmru&Nrd?bB~cPeVkMMB43HdR_GzD>|2wz}0cqNeljNUrgvf6YpCS4) z?F3|Kj)iB_WS_+(#b^5|lI)?Rr0nmAJ%hydkyq^BC5_s&;_}e$JsOgLvBzvmC4m?Q z`;KIsjz+VS!%q>}h1PNHDc>^8PL_OFdQto2} z6>!oiB8j5m{g4n|F(qQCV<6FR#k4f-n3z}yZZL-HN#Fw-qhvHjW1Pli8XwY#P-vwuG3)Bs=kq}Yy^ufo?GXj2pM!+xs zFW@cAv=HV~Q?w#s<`&8$S*PUypILnyF$F0oY zLZ)=U)}N3nDOHqGovE&#tI4P6eu8AE?1@ULl=xhCA=F)zq*U(`k@)nPf)GN^= yT+l1h5&HBeh;S=4dpi|2!%g%O?hNv{O{EZ9wa%kJb`gAnA(9GtNHhlXgZ}}6rNZn0 delta 893 zcmah{O-~d-5PkE}JF~;=GCR7VEv)m5+G>z=LBx8Aj{zdw8iFo9JEm-0}U z_ArB42mKCO9!iMBwPj~cTu0ozxCIxXi$x2@jZKgFWhpK>SblbIWBb=nv*&OVmK0fx?r=>yMTn+3v+7`+k+26*aXIuZd%pGe4&AW+L;GyukE6{b~Moz|cor`^fN$RNP!e*nJN1=vk4bLoGGXE2^pY;qNfiWKv27?>Gm zD;XS>GBa?NH<;+l4tpYNG&_BL&*^i?bo|As=+{aZ-`u0u#U#$BC$-=b9vJ!vbu08O z6&Au`X(V`$-W>$?CswVu2-bFBZnMqMB0P!#e~vOA&q`nD0;X6qaS{7b06exT+PFLga7~l diff --git a/planet-common/planet-redis/target/classes/com/neon/planet/redis/constant/CacheConsts.class b/planet-common/planet-redis/target/classes/com/neon/planet/redis/constant/CacheConsts.class index 509bc7a05ebd09b6552a92adde11884a010fa564..c58b3c5fe98fa6e5ed848ff6ba7b0ad0b90332fa 100644 GIT binary patch delta 437 zcmYk1%TB^T6o&sPLJQHApcEAEH&oEX6)T%swF#FBh+)+b7_f$03YxI;1>7_|f=}Se z#DzweK7@}#JQfmJ%s=Nl|NJLshQ3cR{5^Vm2XKO85t{*cuq9$!#EuibVY^N@%J!V6 za5K)}E0haGEhAx{AvCVd>w=aym5aQlWwdNj!oj~~(2)5|YkGj2$^YU!EwIhR-Z5ibk{2=KbM_C91yOpx5UuhPnG5 zx0Qy?d5gFE#9iBZs8k0=r)gCO41!ggJks0sj#{bSa)!uwQp##IO5C>U1GQ7*u9w0Z z82ujb5ATGlM;Y^wsN<)OfFNXqrg(vPaf-vl@)SoX$w2#)F4Kgh%YZlj3gN{a86)*k f`%hO$XWiP1Rayj)1+3F0V1sNRK;{e`@2UI?cxzF_ delta 264 zcmX@eKABD8)W2Q(7#J8#7*yFAWVjfZ8D!ZRlQmBO$HC$RH9L z>>3pB>F4Gj@9gO8;TrGf=W?=@A$zK?K`1zd^lQUAStO9Zp z^HNK!Cc87~+3}VZrxtnUrR9U=7#WmN)mUZbriY~#Wu{d+=clAXxFB7$O&Y@#cwy5{V$BR4<;EGB!&}OWG}gujauI;D<6! zFO~y|o9xc)?r(Nx|MUIx`32wsX9kW9oESJ2D9~yV2{i6n{h3@!)0cr~j&-C0?@^%M z4uViit-_!~A2RW^00gSzFo|61DxU<(&$PZzV+GFbB+zP3Zz@(3pR(Xs;CkbI`S+^X z3EgB)fu<>^yV}m!q?zCv7%48LpK#XZKjIu_7{!hNqf32``%mOodSAFwI`}dkT;K9&{-~Tj{yh z;$Re3XG`y&oJ!7BcW2TZKAYCI;=&tz;_h25g%-GP+76QVE5yAYW0}GVF8vnvahbvu oT>T}q1*=$Nm}|rvxQ=z&E<@g+y-Dbn;5IgJCw_i}65PeTANaw)=>Px# diff --git a/planet-common/planet-redis/target/classes/com/xxxx/planet/redis/aspect/LockAspect.class b/planet-common/planet-redis/target/classes/com/xxxx/planet/redis/aspect/LockAspect.class deleted file mode 100644 index cd6f43c75aa18a8a12a939e136b784d5700cd33c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4778 zcmb7HiGLJl8GgR(F`L~9fs{}dDFw>0Ifq7C>Qa#;4GIlONW#^sb+Q@4klmSeW|ph9 zDz++$^{ke9*MqiJrL_%BserfE`#%2?FMPh4&F<`m%l-X!<~!c+d*AnY-}m{xdF{Wi zTmY~U|4895jwm>qLIaK|IG)6Vcu2v!l8EDB1@BJaJ+k@U6rwmGh2NJ%0*}bCM;qCC ze+nPK2j%QZ`S?&HK8#Z-d<2il$4BLgkIB}@6?{Spd@_lp_>_XjllU|~lf)A^oxqb) z>t_{wE{V_M3-a+$3M=tNsp?BfbmLJ4Uru73wCJfMGI%(Jui&c+zLvt*aYjmT=4pWi zjxlMvu5I<_O~dj8Rt?(Dlr}f2=|xi;tr6KQki2(b{{thV1KYOm6KEMcq#xF`ylzct zW1eGLQd9ZCWGzdz;%rdWI(sQJ8w7{q`icZyq!)W2jV^Fr0CHBF~YQK|81C_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$uMAng45n z%!a1CU6`<^c}P~_&G3t?o*aBMgEZL981S4| z4(jeWYneB^u$ppWN!VoGv+OI^sg<<}HdmSz5$b;3{4%OclOIjDS`i~WU;S@^#bNd3 za-w!krdqulARXw5}=R9D9Z3gNBGo?Y+YroBAx%S1=4Z`cgF-*&^otPrAG{%+Y6 zHnW_RAwrr@F=ZL7!VZ380THyw^Ny`$xE(!U>ag8_M)o&``YZUQCvXSuSL!krpdpZe-~jI8$}MQ-vkUV3brEr0PGozC>n6VY z*cv9f$BE(zj-2HC6yJ|?V(93=tPgAxZ_wdP>U;x|rmaRAAEsWb3+bO=s`QPng50wBh!C4t=-hB9! zQC-VD6C88Ok;_IqUdAn_8J}p&3dXC0|Gk|vxHTJ#+!=3;r(+kMLSK1uZ#vc*?`c^% zgH@-ozS3EJ2`d?-XnR_j#cfOg3Z26mxzi(Yapv-?=_u3SEVTycw<7v)ELULs2MGlS z#J{lhpEOIt+f64V$c=ChQ3?S)61*poAYg0Hp2s@Y!up}Ej`PT{)i#Uv2(r<1w6kS+7M&5+&~O!n2!!hU zyu{yXh_(+yrFV;|eGLODePg0ZH5EU4Xlvj{4-R3P<}AhvB2l0pYnZPVY?>ymZ)~6_ zD8!&M)!$jRd<);w`DFV!bhUT9gy!ejYw!(;`v9%-6)y>-DvFanhlshf(ioivA}E)- Ne)1*R^4Ko{{{xRjL8kx! diff --git a/planet-common/planet-redis/target/classes/com/xxxx/planet/redis/config/CacheConfig.class b/planet-common/planet-redis/target/classes/com/xxxx/planet/redis/config/CacheConfig.class deleted file mode 100644 index 9c8765063730cd79977b0d5a2496b0444a5e628a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4999 zcmcIn{d*K=6+M&e?rbM{_~&{}ILO-Ry3N>jQ?fn*^jGzplbqya6R>`sy)yEE&| zEF^8UTA{S1DvBZ~t(016wXINf6Pg;o{lWhu@-L{5TF*PPY_oF!gTk+Qr8gQrr&p-`gB!oB;GPDr_eTFJ>k*33v49h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(S_zD(o#cqOpZ|M+CMKnr;|)g6DEILA6B@wbv^M8_0Tvt$8;+VGHMUxz%XQOeVd`$Ca|qFb#&w1aH*E zHG_ob{%>{E4U%ZSVA;9Ccf}3%7M*9Jd>2bQ@zEo$0(#h&N%A|$J83m(OB>ZE-Ah6c zJjCx13H{5^vV0|2f)zpC?$=VL!ypQ3hGR{+(LT6BeBMq9qs!%Kk)XB}`jHEZg6O>- zC`*SVoVYpZ%Vyu(EXX`l+z=JTqloYt#_*t}8a7LER_g6XRf`b%>JNy?D)I5Ft4U@e zmqQ!(p`M@e;;$U670}3M6MGT9CBFTerXgKnqYTY_2He5*c!+JqTfn88*^}^jY~d317F-$mnlx#~%}m!MP6bM8gX zp1>on!&~WAFWr5ZV={kT9Dj_E(9s+SRhU8)tpww4q$u-o0p-9M#|s1eNPsj>6^v9IpjYZ^%450KkT1t36!_UwQ_CXA`XT9wepr| zFdWR{zH`_k-UNG7*e6;w1)|&;5B$$v#r@?Nx`g#hmw8jiWRh@U78{0}n!~sG|dqlb9W(sDtFh5XNrYgHA%!MX0*@zlVkG6L^Y_KSMw@^uc6* z68rE1XHK9Wud;oL>(5|_#rZJa#Q_%72VDZY2!1>Ey0nS-ypp3$w0bFv#SClty_8T! z-DfGWp8#*fNep0+0rVDDQ`?gSTaYT^-<#XdIYDKEpz>h^T`GrUJSAgT#(^B6{}$AC r{>x+YAeZ|kYK2RzI9Gz$a(s!;GJH8d`ZW97_zQ7G3q$A8o#Foh4V3Dy diff --git a/planet-common/planet-redis/target/classes/com/xxxx/planet/redis/constant/CacheConsts$CacheEnum.class b/planet-common/planet-redis/target/classes/com/xxxx/planet/redis/constant/CacheConsts$CacheEnum.class deleted file mode 100644 index aa95fbb9181675cf0a1aa8387abf4f33092e4ed3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2011 zcmbVMT~ixn6n-|@%_hqNAr?w#sYp?hpp8}9T0sbnL4qMDX_-+kI!oBX)?}C2Y&zAe zUie2GFT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zgNmng(H%q-|%YYaTudY_d zHrgceH`(FjQbsw$(bYu`N claimsJws; - try { - claimsJws = Jwts.parserBuilder() - .setSigningKey(Keys.hmacShaKeyFor(SECRET.getBytes(StandardCharsets.UTF_8))) - .build() - .parseClaimsJws(token); - // OK, we can trust this JWT - // 判断该 JWT 是否属于指定系统 - if (Objects.equals(claimsJws.getHeader().get(HEADER_SYSTEM_KEY), systemKey)) { - return Long.parseLong(claimsJws.getBody().getSubject()); - } - } catch (JwtException e) { - log.warn("JWT解析失败:{}", token); - // don't trust the JWT! token解析失败! - } - return null; - } - -} diff --git a/planet-common/planet-security/src/main/java/com/xxxx/planet/security/auth/UserHolder.java b/planet-common/planet-security/src/main/java/com/xxxx/planet/security/auth/UserHolder.java deleted file mode 100644 index 47cbbea..0000000 --- a/planet-common/planet-security/src/main/java/com/xxxx/planet/security/auth/UserHolder.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.xxxx.planet.security.auth; - -import lombok.experimental.UtilityClass; - -import java.util.Set; - -/** - * 用户信息 持有类 - */ -@UtilityClass -public class UserHolder { - - /** - * 当前线程用户ID - */ - private static final ThreadLocal userIdTL = new ThreadLocal<>(); - - /** - * 当前线程管理员ID - */ - private static final ThreadLocal adminIdTL = new ThreadLocal<>(); - - /** - * 当前线程用户权限 - */ - private static final ThreadLocal> authoritiesTL = new ThreadLocal<>(); - - public void setUserId(Long userId) { - userIdTL.set(userId); - } - - public Long getUserId() { - return userIdTL.get(); - } - - public void setAdminId(Long adminId) { - adminIdTL.set(adminId); - } - - public Long getAdminId() { - return adminIdTL.get(); - } - - public void setAuthorities(Set authorities) { - authoritiesTL.set(authorities); - } - - public Set getAuthoritiesTL() { - return authoritiesTL.get(); - } - - public void clear() { - userIdTL.remove(); - adminIdTL.remove(); - authoritiesTL.remove(); - } - -} diff --git a/planet-common/planet-security/src/main/java/com/xxxx/planet/security/config/InitPermissionRoles.java b/planet-common/planet-security/src/main/java/com/xxxx/planet/security/config/InitPermissionRoles.java deleted file mode 100644 index d48bcdf..0000000 --- a/planet-common/planet-security/src/main/java/com/xxxx/planet/security/config/InitPermissionRoles.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.xxxx.planet.security.config; - -import lombok.AllArgsConstructor; -import org.springframework.boot.CommandLineRunner; -import org.springframework.stereotype.Component; - -/** - * Spring容器启动完成时加载权限规则至Redis缓存 - * @author : LJJ - * @date : 2023/9/24 20:15 - */ -@Component -@AllArgsConstructor -public class InitPermissionRoles implements CommandLineRunner { - - //private final ISysPermissionService iSysPermissionService; - - /** - * 将菜单url 对应的角色存到redis中,方便需要进行鉴权的时候再从redis中取出来 - * @param args - * @throws Exception - */ - @Override - public void run(String... args) throws Exception { - //iSysPermissionService.refreshPermRolesRules(); - } - -} diff --git a/planet-common/planet-security/src/main/java/com/xxxx/planet/security/config/WebConfig.java b/planet-common/planet-security/src/main/java/com/xxxx/planet/security/config/WebConfig.java deleted file mode 100644 index dbcc260..0000000 --- a/planet-common/planet-security/src/main/java/com/xxxx/planet/security/config/WebConfig.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.xxxx.planet.security.config; - - -import com.xxxx.planet.security.interceptor.TokenParseInterceptor; -import lombok.RequiredArgsConstructor; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; - - -/** - * 配置拦截器到 Spring Web Mvc - */ -@Configuration -@RequiredArgsConstructor -public class WebConfig implements WebMvcConfigurer { - - private final TokenParseInterceptor tokenParseInterceptor; - - // 导入白名单 url - - @Override - public void addInterceptors(InterceptorRegistry registry) { - - System.out.println("初始化webConfig"); - - // Token 解析拦截器 - registry.addInterceptor(tokenParseInterceptor) - // 拦截请求 - .addPathPatterns("/**") - // 放行登录注册相关请求接口 - .excludePathPatterns("/api/front/test/login", - "/api/front/test/ceshi", - "/api/front/test/qinchu","/favicon.ico"); - - } - -} diff --git a/planet-common/planet-security/src/main/java/com/xxxx/planet/security/interceptor/TokenParseInterceptor.java b/planet-common/planet-security/src/main/java/com/xxxx/planet/security/interceptor/TokenParseInterceptor.java deleted file mode 100644 index b8cd717..0000000 --- a/planet-common/planet-security/src/main/java/com/xxxx/planet/security/interceptor/TokenParseInterceptor.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.xxxx.planet.security.interceptor; - - -import com.xxxx.planet.security.auth.JwtUtils; -import com.xxxx.planet.security.auth.UserHolder; -import com.xxxx.planet.core.constant.ErrorCodeEnum; -import com.xxxx.planet.core.exception.BusinessException; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import org.springframework.web.servlet.HandlerInterceptor; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.Objects; - -/** - * 认证拦截(是否登录拦截,判断token里面的userId是否有效)(如果确实存在这个用户,就放行) - * 授权拦截不在这里(因为这个项目的管理端是在小程序上,并且例如像 星球主 如果没有开通某个收费业务的话不可以使用完全功能, - * 所以单独使用注解来进行授权判断的话,可以更细粒度的授权判断 - * ( 2.0版本:将菜单授权(控制层) 和 细粒度授权(方法) 进行分割,使用认证授权模式更容易维护 ) - * Token 解析拦截器 - */ -@Component -@RequiredArgsConstructor -public class TokenParseInterceptor implements HandlerInterceptor { - - //private final UserInfoCacheManager userInfoCacheManager; - - // 直接进行查询操作,不为null时就设置adminId - // 每次拦截都需要在数据库中查询角色列表,然后存在线程中,方便进行权限判断的时候直接获取,获取菜单url对应的角色的时候就直接从redis中获取 - - /** - * handle 执行前调用 - */ - @SuppressWarnings("NullableProblems") - @Override - public boolean preHandle(HttpServletRequest request, HttpServletResponse response, - Object handler) throws Exception { - - // 获取登录 JWT - String token = request.getHeader("Authorization"); - - // 开始认证 - if (!StringUtils.hasText(token)) { - // token 为空 - throw new BusinessException(ErrorCodeEnum.USER_LOGIN_EXPIRED); - } - Long userId = JwtUtils.parseToken(token, "user"); - if (Objects.isNull(userId)) { - // token 解析失败 - throw new BusinessException(ErrorCodeEnum.USER_LOGIN_EXPIRED); - } - // todo 判断userId对应的数据库信息存不存在 - //UserInfoDto userInfo = userInfoCacheManager.getUser(userId); - //if (Objects.isNull(userInfo)) { - // 用户不存在 - //throw new BusinessException(ErrorCodeEnum.USER_ACCOUNT_NOT_EXIST); - //} - // 设置 userId 到当前线程 (因为当前用户是在一起的) - // 设置 adminId 到当前线程 - - // 设置 用户角色列表 到当前线程 - UserHolder.setUserId(userId); - return HandlerInterceptor.super.preHandle(request, response, handler); - } - - /** - * handler 执行后调用,出现异常不调用 - */ - @SuppressWarnings("NullableProblems") - @Override - public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, - ModelAndView modelAndView) throws Exception { - HandlerInterceptor.super.postHandle(request, response, handler, modelAndView); - } - - /** - * DispatcherServlet 完全处理完请求后调用,出现异常照常调用 - */ - @SuppressWarnings("NullableProblems") - @Override - public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) - throws Exception { - // 清理当前线程保存的用户数据 - UserHolder.clear(); - HandlerInterceptor.super.afterCompletion(request, response, handler, ex); - } - -} diff --git a/planet-common/planet-security/target/classes/com/xxxx/planet/security/auth/JwtUtils.class b/planet-common/planet-security/target/classes/com/xxxx/planet/security/auth/JwtUtils.class deleted file mode 100644 index 89f5678fb8d25d3983ec766f40623c25defede2d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3213 zcma)8`F9gl7`-onPMb_wQuZ~-(gh^6(o!gbT~e{M6iF$vC{B|hos!OknF&yF-*<5r z7hC{wJqOSOt)8R)?Ej&MKfp$$Q`X-u>>kz4w0q`=?(3Y{vH?+>2cb z?kh)E7`xFOLJ#)HQExf+R^Wc@3n78N5cZ>AiVw)o19I2FFb?6c{2U46K|B=3Q9P_b z3nPMo5RynqiLT&S7z>b=z=QH*C>W|h0LROb31b*$2&-W!$d=+t7w?m+L)u9#meI^~EaBRQndWL`yJb4AX1e`a zCZ`L`-4$=`i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z1W|V#GsjRCKt#EQ^6RJ=MQ9A+0LGvST=8)49Pz(w<#9e&tdUOOUj0Axrqo|x@eU`L7TcBxFX|3zwxSnpd``zb$LhFmCHXf}Bfym~ws3b)@+Lwxf91$` zb{oekE&BQ`)Zb3YVg&!fZUuM$LqR~n4*o+Z*cl#=&Q@y4=mg{)&HXZ2(uU+dtL_F? z{EU?cBhedJ^{b~P{V4NRt2~apt42Z(SM Jr!0WZe*wF4YHeR~o{zV%H{*s=i`w#3}G ze%swQHtV%-BR>X?p?k)@ic?oOTc0Fv94gE{3|q{1vFQiqr+(+iLrh9& z>=R>Qpo7BFBo<9C3{!9YtRvkq)sd|W;uRd`_h3-HLNU>SX2y-o74b<` zVP;7o!|HdWj`@smQcm2Yk%z*C@p9gGhb1kKyH1r-;l>2#R5!_ENm5U` zWzsekP$BQNjgAy@bpbEz`hjov*fo3NQ{T0w7k1ote7Ri?q_J+#czsUKdspOerS(t3 zcFRN@v(m2DPQso2upfEmu`i8YOug1cwKC42TE=7iSjH1PRj8x`FKsL1yqsS^RbgRF z<}#jPql`P)P*_caUIo2=w;M**v|e^iq^%zYkKTEvD+`6Y2dt&We_a!Sn0(D^>mK(( ztLEt-2yN}i)cl}lbzpr>7~y!Xa6aY8+zo~L|5b(UN+Dhzy)mAp)SNeBXK%~kD4w$% z`>Swn*uMB{AUS4#BGU=qQq!^MUh3~xL2865ODh~zj zTI|GN!hJyQZ_NHetAYR);pb3!Ry4*?P z)*0twBhhm!(erGqC!55w_#{S2IyDfsidn9|rofxbYKz_8CN1wy0 diff --git a/planet-common/planet-security/target/classes/com/xxxx/planet/security/config/InitPermissionRoles.class b/planet-common/planet-security/target/classes/com/xxxx/planet/security/config/InitPermissionRoles.class deleted file mode 100644 index c7c9eb8d90d2e979fd37afbad47960b331d41e44..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 686 zcmbVJyKWOf6g}hEUN8;`3790%&?PCD0#X?vp$H_T1)>DGp&GAmHWR!vtJzsdNl8-2AM$ha$>_Op zr9O$lx^lcXQRp7}nJBE~*2&wpno4+YrgKI%a$lJF!~~oCt6(>t*+$_YFMOph_;gJ` ziMo-Z4K`lt!n;#j>etT3BMFsl8tdJ$pGz|)nF%G!H<$FHFnD=UNFABpWO$&k{zl@N zpB##C6tfT$O_xXt&6sjiES)rdEuOoWGezzx|87y1*X(Nw~u9V3X+`+{HcW)WZn) E4SYYTtpET3 diff --git a/planet-common/planet-security/target/classes/com/xxxx/planet/security/config/WebConfig.class b/planet-common/planet-security/target/classes/com/xxxx/planet/security/config/WebConfig.class deleted file mode 100644 index 7d3083054d6e6b25524dfe4ab580291049f54110..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1791 zcmb_dTTc@~6#j-5c3D@!MevT|wHIZ)-#`$#D5fZ(q=xw7b~|lH+g;q9B0Tuun~6UA z=CjWl#l%E^fd7NPVLZFVQcQ^K)G^9BaNbzIPKQO6}6m&1iC2D))o!!-@pHQZq6Ro-*q&f0z;rd=g`M=UDO zXBf^nUX?G?!xt;ID-;ieQ}d--;c~-{&$rq=#L#6I3Qc$c!-GV|^GiHf^rc%W`gT>k z^!(@irN|Sqzf>U)j^`F-iQBI0DO*X;?sw^pj^wyNtJwF!t@hApjp!@3%8Sd>+7{>%`BD2BV+&tn3dS#ti0C#b%f zWmpN6sFDm`jnI2DkwDVpv!sq9jf7n#g?m~oGiYHssY)nMqQ0?7*{D<|w;yebs-t|` zT+s}#|6kDeZMRSneiPnMvSp@G(roJ%sHY#p^iGhA!0K1ltgXuQQf0bS6;BgST4=hX z1bW1>Q>hiiX2-EaGKT@W&%42}mtHHZA-eP1XuJ=-)c4Ws720V8-24n?wXGtSPJKaq z747jK=vatZT6Pt>Rv&j}7vh$YU1+yp_dL(@UUvWd``6zA+(xktA9mm)OcG?*t4}*}PY_j_7Aq$RL3W zcs}$UacnuR;C`N0gy&o9-T`-4Z9m|Pwb@Aq-H)I%+-wRy;>ghE^N0sSb788C>85?9 zrZ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/xxxx/planet/gateway/config/PlanetCorsConfig.class b/planet-gateway/target/classes/com/xxxx/planet/gateway/config/PlanetCorsConfig.class deleted file mode 100644 index 310e21aebc813282379333d89a91dd4fb251d58f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1546 zcmb7E+foxj5IqwD8^a-!SfW_?Hpvdj;<8KaP5}SI57C!k zNtGYqM_Kl4LWn}8a8uR2(|h`KPtTeB`u*c4fH~yiNMOvsgE%4>i{YX6$rw`Fr?tt% zF^&oSHfeyz(Wzlm+D{vpiK82{2IdSrV(3`5U0Xe6XiKKH7^175B^kQ&wkuy(_6pK} zCkhTl5_zvEoGszodR-4jRoM<0rt?K_j~~&)_Z{I%#Y;lTL-CmxJ$J`0@i$>~)$@bZ zFtEhXRixDiS$JVPO8N}hWGe6ZB_8biwp-fq#hyI${7?K)7Kp_UxGzOf*$0wqnnofq zb<~P5OtmIBD_`-2vOSk_`)axMz@}I6i?r95t%(|)y!V})2&8q6xkg0%LvJgtviIbc z9oRIs71#AtSevFcabXo|NXa9`MFYxnQs`deHC7rJwK(waNGEs2fnb=wENSf^PA6fa z5B&_2El=RwHmQxWQu~XXJ6arNFHnmMQwvij=8`ns|(?fkhKbST^wlB(}Ad zg)Tc_5-m?tk!N_$Fnc-5ztp3*y~02O`!D%2^yq1GQgw-M6n14%QAk+UisN{P(%SIt zlI_xTlKC^-rqaS*(wD3W`br8*%fBhKE>+pH7<$igbDrmr2pEh5;Z)?t4#QybW2%Y0 zj?j`0qze03^`#|AeZnEJ4K}xO3f8?0`LbjObOkRs-L>YVdjA*dt8q!sk%arrC0l1T z&ih`PjqFfxO#%_?eSyu ze5LFNbj4A`$o7#Pz*VZ-Pt|m#QQSrvcQK9Ou$$pp#d getAllUser(HttpServletRequest request) { - logger.info("开始"); - ResponseResult responseResult = loginService.getUserAgreement(request); - logger.info("返回结果 ===>"+String.valueOf(responseResult)); - logger.info("结束"); - return responseResult; - } - - /** - * 获取隐私政策 - * @param request - * @return - */ - @GetMapping("/getPrivacyPolicy") - public ResponseResult getPrivacyPolicy(HttpServletRequest request) { - logger.info("开始"); - ResponseResult responseResult = loginService.getPrivacyPolicy(request); - logger.info("返回结果 ===>"+String.valueOf(responseResult)); - logger.info("结束"); - return responseResult; - } -} +//package com.neon.planet.login.controller; +// +//import com.neon.planet.core.model.domain.ResponseResult; +//import com.neon.planet.login.service.LoginService; +//import lombok.RequiredArgsConstructor; +//import org.slf4j.Logger; +//import org.slf4j.LoggerFactory; +//import org.springframework.web.bind.annotation.GetMapping; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RestController; +// +//import javax.annotation.Resource; +//import javax.servlet.http.HttpServletRequest; +// +//@RestController +//@RequestMapping("/login") +//@RequiredArgsConstructor +//public class LoginController { +// /*日志标识*/ +// /*哪个类里面打印的日志*/ +// final Logger logger = LoggerFactory.getLogger(LoginController.class); +// +// @Resource +// private LoginService loginService; +// +// /** +// * 获取用户协议 +// * @param request +// * @return +// */ +// @GetMapping("/getUserAgreement") +// public ResponseResult getAllUser(HttpServletRequest request) { +// logger.info("开始"); +// ResponseResult responseResult = loginService.getUserAgreement(request); +// logger.info("返回结果 ===>"+String.valueOf(responseResult)); +// logger.info("结束"); +// return responseResult; +// } +// +// /** +// * 获取隐私政策 +// * @param request +// * @return +// */ +// @GetMapping("/getPrivacyPolicy") +// public ResponseResult getPrivacyPolicy(HttpServletRequest request) { +// logger.info("开始"); +// ResponseResult responseResult = loginService.getPrivacyPolicy(request); +// logger.info("返回结果 ===>"+String.valueOf(responseResult)); +// logger.info("结束"); +// return responseResult; +// } +//} diff --git a/planet-login/planet-login-service/src/main/java/com/neon/planet/login/dao/entity/PrivacyPolicy.java b/planet-login/planet-login-service/src/main/java/com/neon/planet/login/dao/entity/PrivacyPolicy.java index af0163a..7c8a8e6 100644 --- a/planet-login/planet-login-service/src/main/java/com/neon/planet/login/dao/entity/PrivacyPolicy.java +++ b/planet-login/planet-login-service/src/main/java/com/neon/planet/login/dao/entity/PrivacyPolicy.java @@ -1,17 +1,17 @@ -package com.neon.planet.login.dao.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@NoArgsConstructor -@AllArgsConstructor -@TableName("privacy_policy") -public class PrivacyPolicy { - - private Long PrivateID; - - private String PrivateCont; -} +//package com.neon.planet.login.dao.entity; +// +//import com.baomidou.mybatisplus.annotation.TableName; +//import lombok.AllArgsConstructor; +//import lombok.Data; +//import lombok.NoArgsConstructor; +// +//@Data +//@NoArgsConstructor +//@AllArgsConstructor +//@TableName("privacy_policy") +//public class PrivacyPolicy { +// +// private Long PrivateID; +// +// private String PrivateCont; +//} diff --git a/planet-login/planet-login-service/src/main/java/com/neon/planet/login/dao/entity/UserAgreement.java b/planet-login/planet-login-service/src/main/java/com/neon/planet/login/dao/entity/UserAgreement.java index 353611e..d10d812 100644 --- a/planet-login/planet-login-service/src/main/java/com/neon/planet/login/dao/entity/UserAgreement.java +++ b/planet-login/planet-login-service/src/main/java/com/neon/planet/login/dao/entity/UserAgreement.java @@ -1,17 +1,17 @@ -package com.neon.planet.login.dao.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@NoArgsConstructor -@AllArgsConstructor -@TableName("user_agreement") -public class UserAgreement { - - private Long UserAgreeID; - - private String UserAgreeCont; -} +//package com.neon.planet.login.dao.entity; +// +//import com.baomidou.mybatisplus.annotation.TableName; +//import lombok.AllArgsConstructor; +//import lombok.Data; +//import lombok.NoArgsConstructor; +// +//@Data +//@NoArgsConstructor +//@AllArgsConstructor +//@TableName("user_agreement") +//public class UserAgreement { +// +// private Long UserAgreeID; +// +// private String UserAgreeCont; +//} diff --git a/planet-login/planet-login-service/src/main/java/com/neon/planet/login/dao/mapper/PrivacyPolicyMapper.java b/planet-login/planet-login-service/src/main/java/com/neon/planet/login/dao/mapper/PrivacyPolicyMapper.java index eb0dab9..7f2be82 100644 --- a/planet-login/planet-login-service/src/main/java/com/neon/planet/login/dao/mapper/PrivacyPolicyMapper.java +++ b/planet-login/planet-login-service/src/main/java/com/neon/planet/login/dao/mapper/PrivacyPolicyMapper.java @@ -1,10 +1,10 @@ -package com.neon.planet.login.dao.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.neon.planet.login.dao.entity.PrivacyPolicy; -import org.apache.ibatis.annotations.Mapper; - - -@Mapper -public interface PrivacyPolicyMapper extends BaseMapper { -} +//package com.neon.planet.login.dao.mapper; +// +//import com.baomidou.mybatisplus.core.mapper.BaseMapper; +//import com.neon.planet.login.dao.entity.PrivacyPolicy; +//import org.apache.ibatis.annotations.Mapper; +// +// +//@Mapper +//public interface PrivacyPolicyMapper extends BaseMapper { +//} diff --git a/planet-login/planet-login-service/src/main/java/com/neon/planet/login/dao/mapper/UserAgreementMapper.java b/planet-login/planet-login-service/src/main/java/com/neon/planet/login/dao/mapper/UserAgreementMapper.java index 66564f1..79b2566 100644 --- a/planet-login/planet-login-service/src/main/java/com/neon/planet/login/dao/mapper/UserAgreementMapper.java +++ b/planet-login/planet-login-service/src/main/java/com/neon/planet/login/dao/mapper/UserAgreementMapper.java @@ -1,10 +1,10 @@ -package com.neon.planet.login.dao.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.neon.planet.login.dao.entity.UserAgreement; -import org.apache.ibatis.annotations.Mapper; - - -@Mapper -public interface UserAgreementMapper extends BaseMapper { -} \ No newline at end of file +//package com.neon.planet.login.dao.mapper; +// +//import com.baomidou.mybatisplus.core.mapper.BaseMapper; +//import com.neon.planet.login.dao.entity.UserAgreement; +//import org.apache.ibatis.annotations.Mapper; +// +// +//@Mapper +//public interface UserAgreementMapper extends BaseMapper { +//} \ No newline at end of file diff --git a/planet-login/planet-login-service/src/main/java/com/neon/planet/login/manager/cache/PrivacyPolicyCacheManager.java b/planet-login/planet-login-service/src/main/java/com/neon/planet/login/manager/cache/PrivacyPolicyCacheManager.java index 6cba463..da3f2c2 100644 --- a/planet-login/planet-login-service/src/main/java/com/neon/planet/login/manager/cache/PrivacyPolicyCacheManager.java +++ b/planet-login/planet-login-service/src/main/java/com/neon/planet/login/manager/cache/PrivacyPolicyCacheManager.java @@ -1,49 +1,50 @@ -package com.neon.planet.login.manager.cache; - -import com.neon.planet.login.dao.entity.PrivacyPolicy; -import com.neon.planet.redis.constant.CacheConsts; -import lombok.RequiredArgsConstructor; -import org.springframework.cache.annotation.CacheEvict; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.data.redis.core.StringRedisTemplate; -import org.springframework.stereotype.Component; - - -@Component -@RequiredArgsConstructor -public class PrivacyPolicyCacheManager { - - private final PrivacyPolicy privacyPolicy; - private final StringRedisTemplate stringRedisTemplate; - - @Cacheable(cacheManager = CacheConsts.REDIS_CACHE_MANAGER, - value = CacheConsts.USER_INFO_CACHE_NAME) - public PrivacyPolicy getPrivacyPolicy(){ - PrivacyPolicy privacyPolicy = new PrivacyPolicy(); - //user.setId(10); - //user.setUsername("admin123"); - /*try{ - user = nenoMapper.selectOne(new QueryWrapper().eq("username",username)); - }catch (Exception e){ - throw new BusinessException(ErrorCodeEnum.test_code); - }*/ - /*if(null==user){ - throw new BusinessException(ErrorCodeEnum.USER_ACCOUNT_NOT_EXIST); - }*/ - return privacyPolicy; - } - - - @CacheEvict(cacheManager = CacheConsts.REDIS_CACHE_MANAGER, - value = CacheConsts.USER_INFO_CACHE_NAME) - public void evictCache(){ - - } - - @CacheEvict(cacheManager = CacheConsts.REDIS_CACHE_MANAGER, - value = CacheConsts.USER_INFO_CACHE_NAME) - public void evictCacheX(String username){ - - } - -} +//package com.neon.planet.login.manager.cache; +// +//import com.neon.planet.login.dao.entity.PrivacyPolicy; +//import com.neon.planet.redis.constant.CacheConsts; +//import lombok.RequiredArgsConstructor; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +//import org.springframework.data.redis.core.StringRedisTemplate; +//import org.springframework.stereotype.Component; +// +// +//@Component +//@RequiredArgsConstructor +//public class PrivacyPolicyCacheManager { +// +// private final PrivacyPolicy privacyPolicy; +// private final StringRedisTemplate stringRedisTemplate; +// +// @Cacheable(cacheManager = CacheConsts.REDIS_CACHE_MANAGER, +// value = CacheConsts.USER_INFO_CACHE_NAME) +// public PrivacyPolicy getPrivacyPolicy(){ +// PrivacyPolicy privacyPolicy = new PrivacyPolicy(); +// privacyPolicy.setPrivateCont("13164"); +// //user.setId(10); +// //user.setUsername("admin123"); +// /*try{ +// user = nenoMapper.selectOne(new QueryWrapper().eq("username",username)); +// }catch (Exception e){ +// throw new BusinessException(ErrorCodeEnum.test_code); +// }*/ +// /*if(null==user){ +// throw new BusinessException(ErrorCodeEnum.USER_ACCOUNT_NOT_EXIST); +// }*/ +// return privacyPolicy; +// } +// +// +// @CacheEvict(cacheManager = CacheConsts.REDIS_CACHE_MANAGER, +// value = CacheConsts.USER_INFO_CACHE_NAME) +// public void evictCache(){ +// +// } +// +// @CacheEvict(cacheManager = CacheConsts.REDIS_CACHE_MANAGER, +// value = CacheConsts.USER_INFO_CACHE_NAME) +// public void evictCacheX(String username){ +// +// } +// +//} diff --git a/planet-login/planet-login-service/src/main/java/com/neon/planet/login/manager/cache/UserAgreementCacheManager.java b/planet-login/planet-login-service/src/main/java/com/neon/planet/login/manager/cache/UserAgreementCacheManager.java index 91ef1f4..41c830c 100644 --- a/planet-login/planet-login-service/src/main/java/com/neon/planet/login/manager/cache/UserAgreementCacheManager.java +++ b/planet-login/planet-login-service/src/main/java/com/neon/planet/login/manager/cache/UserAgreementCacheManager.java @@ -1,50 +1,51 @@ -package com.neon.planet.login.manager.cache; - -import com.neon.planet.login.dao.entity.UserAgreement; -import com.neon.planet.login.dao.mapper.UserAgreementMapper; -import com.neon.planet.redis.constant.CacheConsts; -import lombok.RequiredArgsConstructor; -import org.springframework.cache.annotation.CacheEvict; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.data.redis.core.StringRedisTemplate; -import org.springframework.stereotype.Component; - - -@Component -@RequiredArgsConstructor -public class UserAgreementCacheManager { - - private final UserAgreementMapper userAgreementMapper; - private final StringRedisTemplate stringRedisTemplate; - - @Cacheable(cacheManager = CacheConsts.REDIS_CACHE_MANAGER, - value = CacheConsts.USER_INFO_CACHE_NAME) - public UserAgreement getUserAgreement(){ - UserAgreement userAgreement = new UserAgreement(); - //user.setId(10); - //user.setUsername("admin123"); - /*try{ - user = nenoMapper.selectOne(new QueryWrapper().eq("username",username)); - }catch (Exception e){ - throw new BusinessException(ErrorCodeEnum.test_code); - }*/ - /*if(null==user){ - throw new BusinessException(ErrorCodeEnum.USER_ACCOUNT_NOT_EXIST); - }*/ - return userAgreement; - } - - - @CacheEvict(cacheManager = CacheConsts.REDIS_CACHE_MANAGER, - value = CacheConsts.USER_INFO_CACHE_NAME) - public void evictCache(){ - - } - - @CacheEvict(cacheManager = CacheConsts.REDIS_CACHE_MANAGER, - value = CacheConsts.USER_INFO_CACHE_NAME) - public void evictCacheX(String username){ - - } - -} +//package com.neon.planet.login.manager.cache; +// +//import com.neon.planet.login.dao.entity.UserAgreement; +//import com.neon.planet.login.dao.mapper.UserAgreementMapper; +//import com.neon.planet.redis.constant.CacheConsts; +//import lombok.RequiredArgsConstructor; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +//import org.springframework.data.redis.core.StringRedisTemplate; +//import org.springframework.stereotype.Component; +// +// +//@Component +//@RequiredArgsConstructor +//public class UserAgreementCacheManager { +// +// private final UserAgreementMapper userAgreementMapper; +// private final StringRedisTemplate stringRedisTemplate; +// +// @Cacheable(cacheManager = CacheConsts.REDIS_CACHE_MANAGER, +// value = CacheConsts.USER_INFO_CACHE_NAME) +// public UserAgreement getUserAgreement(){ +// UserAgreement userAgreement = new UserAgreement(); +// userAgreement.setUserAgreeCont("1214"); +// //user.setId(10); +// //user.setUsername("admin123"); +// /*try{ +// user = nenoMapper.selectOne(new QueryWrapper().eq("username",username)); +// }catch (Exception e){ +// throw new BusinessException(ErrorCodeEnum.test_code); +// }*/ +// /*if(null==user){ +// throw new BusinessException(ErrorCodeEnum.USER_ACCOUNT_NOT_EXIST); +// }*/ +// return userAgreement; +// } +// +// +// @CacheEvict(cacheManager = CacheConsts.REDIS_CACHE_MANAGER, +// value = CacheConsts.USER_INFO_CACHE_NAME) +// public void evictCache(){ +// +// } +// +// @CacheEvict(cacheManager = CacheConsts.REDIS_CACHE_MANAGER, +// value = CacheConsts.USER_INFO_CACHE_NAME) +// public void evictCacheX(String username){ +// +// } +// +//} diff --git a/planet-login/planet-login-service/src/main/java/com/neon/planet/login/service/LoginService.java b/planet-login/planet-login-service/src/main/java/com/neon/planet/login/service/LoginService.java index c6ae553..c6d79d6 100644 --- a/planet-login/planet-login-service/src/main/java/com/neon/planet/login/service/LoginService.java +++ b/planet-login/planet-login-service/src/main/java/com/neon/planet/login/service/LoginService.java @@ -1,13 +1,13 @@ -package com.neon.planet.login.service; - -import com.neon.planet.core.model.domain.ResponseResult; -import org.springframework.stereotype.Service; - -import javax.servlet.http.HttpServletRequest; - -@Service -public interface LoginService { - ResponseResult getUserAgreement(HttpServletRequest request); - - ResponseResult getPrivacyPolicy(HttpServletRequest request); -} +//package com.neon.planet.login.service; +// +//import com.neon.planet.core.model.domain.ResponseResult; +//import org.springframework.stereotype.Service; +// +//import javax.servlet.http.HttpServletRequest; +// +//@Service +//public interface LoginService { +// ResponseResult getUserAgreement(HttpServletRequest request); +// +// ResponseResult getPrivacyPolicy(HttpServletRequest request); +//} diff --git a/planet-login/planet-login-service/src/main/java/com/neon/planet/login/service/impl/LoginServiceImpl.java b/planet-login/planet-login-service/src/main/java/com/neon/planet/login/service/impl/LoginServiceImpl.java index 953cfb8..ed593f4 100644 --- a/planet-login/planet-login-service/src/main/java/com/neon/planet/login/service/impl/LoginServiceImpl.java +++ b/planet-login/planet-login-service/src/main/java/com/neon/planet/login/service/impl/LoginServiceImpl.java @@ -1,53 +1,53 @@ -package com.neon.planet.login.service.impl; - -import com.neon.planet.core.model.domain.ResponseResult; -import com.neon.planet.core.model.factory.ResponseResultFactory; -import com.neon.planet.login.dao.entity.PrivacyPolicy; -import com.neon.planet.login.dao.entity.UserAgreement; -import com.neon.planet.login.manager.cache.PrivacyPolicyCacheManager; -import com.neon.planet.login.manager.cache.UserAgreementCacheManager; -import com.neon.planet.login.service.LoginService; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; - -import javax.servlet.http.HttpServletRequest; -import java.util.HashMap; -import java.util.Map; - -@Slf4j -@Service -@RequiredArgsConstructor -public class LoginServiceImpl implements LoginService { - - private final PrivacyPolicyCacheManager privacyPolicyCacheManager; - - private final UserAgreementCacheManager userAgreementCacheManager; - /** - * 获取用户协议 - * @param request - * @return - */ - @Override - public ResponseResult getUserAgreement(HttpServletRequest request) { - UserAgreement userAgreement = userAgreementCacheManager.getUserAgreement(); - Map Map = new HashMap<>(); - Map.put("userAgreement", userAgreement.getUserAgreeCont()); - System.out.println(Map); - return ResponseResultFactory.buildResponseResult(100000,"获取用户协议成功",Map); - } - - /** - * 获取隐私政策 - * @param request - * @return - */ - @Override - public ResponseResult getPrivacyPolicy(HttpServletRequest request) { - PrivacyPolicy privacyPolicy = privacyPolicyCacheManager.getPrivacyPolicy(); - Map Map = new HashMap<>(); - Map.put("privacyPolicy", privacyPolicy.getPrivateCont()); - System.out.println(Map); - return ResponseResultFactory.buildResponseResult(100000,"获取隐私政策成功",Map); - } -} +//package com.neon.planet.login.service.impl; +// +//import com.neon.planet.core.model.domain.ResponseResult; +//import com.neon.planet.core.model.factory.ResponseResultFactory; +//import com.neon.planet.login.dao.entity.PrivacyPolicy; +//import com.neon.planet.login.dao.entity.UserAgreement; +//import com.neon.planet.login.manager.cache.PrivacyPolicyCacheManager; +//import com.neon.planet.login.manager.cache.UserAgreementCacheManager; +//import com.neon.planet.login.service.LoginService; +//import lombok.RequiredArgsConstructor; +//import lombok.extern.slf4j.Slf4j; +//import org.springframework.stereotype.Service; +// +//import javax.servlet.http.HttpServletRequest; +//import java.util.HashMap; +//import java.util.Map; +// +//@Slf4j +//@Service +//@RequiredArgsConstructor +//public class LoginServiceImpl implements LoginService { +// +// private final PrivacyPolicyCacheManager privacyPolicyCacheManager; +// +// private final UserAgreementCacheManager userAgreementCacheManager; +// /** +// * 获取用户协议 +// * @param request +// * @return +// */ +// @Override +// public ResponseResult getUserAgreement(HttpServletRequest request) { +// UserAgreement userAgreement = userAgreementCacheManager.getUserAgreement(); +// Map Map = new HashMap<>(); +// Map.put("userAgreement", userAgreement.getUserAgreeCont()); +// System.out.println(Map); +// return ResponseResultFactory.buildResponseResult(100000,"获取用户协议成功",Map); +// } +// +// /** +// * 获取隐私政策 +// * @param request +// * @return +// */ +// @Override +// public ResponseResult getPrivacyPolicy(HttpServletRequest request) { +// PrivacyPolicy privacyPolicy = privacyPolicyCacheManager.getPrivacyPolicy(); +// Map Map = new HashMap<>(); +// Map.put("privacyPolicy", privacyPolicy.getPrivateCont()); +// System.out.println(Map); +// return ResponseResultFactory.buildResponseResult(100000,"获取隐私政策成功",Map); +// } +//} diff --git a/planet-login/planet-login-service/target/classes/application-dev.yml b/planet-login/planet-login-service/target/classes/application-dev.yml index b31d825..f6c1a32 100644 --- a/planet-login/planet-login-service/target/classes/application-dev.yml +++ b/planet-login/planet-login-service/target/classes/application-dev.yml @@ -5,7 +5,7 @@ spring: name: login-service # 连接池配置 datasource: - url: jdbc:mysql://192.168.242.129:3306/store_user?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useUnicode=true&useSSL=false + url: jdbc:mysql://192.168.242.129:3306/neon_planet?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useUnicode=true&useSSL=false username: root password: 123456 driver-class-name: com.mysql.cj.jdbc.Driver diff --git a/planet-login/planet-login-service/target/classes/com/neon/planet/login/controller/SendMessageController.class b/planet-login/planet-login-service/target/classes/com/neon/planet/login/controller/SendMessageController.class index e1b8a2806d3c462f94944cbe99a578f22f0d0244..701e94f8133f551ca6bd7e0e02adfcd995f44459 100644 GIT binary patch delta 51 zcmbOtFhyX46uY7f13QB(0~doFgBXK65GpWeF(@*aGAJ=PFsLy2GN?|rX76VdoqU?z F69BY(2e$wK delta 51 zcmbOtFhyX46uY7X13QBx0~do7gBXJ}gFJ%_gBF7PWNY?*M#0Ia G**yWUn+J~o diff --git a/planet-test/planet-test-api/src/main/java/com/xxxx/planet/test/feign/TestFeign.java b/planet-test/planet-test-api/src/main/java/com/xxxx/planet/test/feign/TestFeign.java deleted file mode 100644 index f5b7ce6..0000000 --- a/planet-test/planet-test-api/src/main/java/com/xxxx/planet/test/feign/TestFeign.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.xxxx.planet.test.feign; - -import com.xxxx.planet.core.model.domain.RestResp; -import com.xxxx.planet.test.model.dto.User; -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.stereotype.Component;; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; - -import java.util.HashMap; -import java.util.Map; - -/** - * 测试微服务调用客户端 - * @author : LJJ - * @date : 2023/9/23 19:21 - */ -@Component -@FeignClient(value = "planet-test-service",fallback = TestFeign.TestFeignFallback.class) -public interface TestFeign { - - /** - * 测试登录 - */ - //@RequestMapping(value = "/api/front/test/login",method = RequestMethod.POST) - @PostMapping(value = "/api/front/test/login") - RestResp> userLogin(@RequestBody User user); - - @Component - class TestFeignFallback implements TestFeign { - - @Override - public RestResp> userLogin(User user) { - Map map = new HashMap(); - map.put("message","返回托底数据"); - return RestResp.ok(map); - } - - } - -} diff --git a/planet-test/planet-test-api/src/main/java/com/xxxx/planet/test/model/dto/User.java b/planet-test/planet-test-api/src/main/java/com/xxxx/planet/test/model/dto/User.java deleted file mode 100644 index da2743e..0000000 --- a/planet-test/planet-test-api/src/main/java/com/xxxx/planet/test/model/dto/User.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xxxx.planet.test.model.dto; - -import lombok.Data; - -import java.io.Serializable; - -/** - * @author : LJJ - * @date : 2023/9/23 19:50 - */ -@Data -public class User implements Serializable { - - private String username; - - private String password; - -} diff --git a/planet-test/planet-test-api/target/classes/com/xxxx/planet/test/feign/TestFeign$TestFeignFallback.class b/planet-test/planet-test-api/target/classes/com/xxxx/planet/test/feign/TestFeign$TestFeignFallback.class deleted file mode 100644 index 2420635fd33da2f43944a7ad3b0d5e1bb6c1a225..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1279 zcmb_cTTc@~6#k|yY+K5$-oPtp!4{EGV~j}&(U1^LiW-U-UreTDCFP4+;@eRmRrK` zr3l1#;f3ARccL;wrWwkhVj4;_REzubcoenE7p>uU$+%o+^dF#h z(@!BmlKMgKZrX8@jAX~y2H4y9xQE`Iv2qB#w2n;40DU+>lHni@AsK@okW7+p-~$r( zH;|ki&!_So@6nmWz43Q&*6A#Ph_5HMD^M6C#4;N54((uDyu^aTI70ks(hOjbkVgsG g!AK1pi>ZziB+{>Ec%i82DRE`qyPW_ diff --git a/planet-test/planet-test-api/target/classes/com/xxxx/planet/test/feign/TestFeign.class b/planet-test/planet-test-api/target/classes/com/xxxx/planet/test/feign/TestFeign.class deleted file mode 100644 index 2b374cc917315977d7bfebbe68548a7065fdd5c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 998 zcmb_b&2G~`5T0$5x(y|?v;_*BP!9#E9U%ci3POTNk&seRCBTK##-5mM*SqfSI;F3` zBXQsXcqqi!ZY>}=AcU>a{^*p2(TRA}EbVGQT`> zT`7)(Qzq@zfa>P$kTd&$3m-BDqJ%IJggYNF|tF*eActl`|B4y{Yk=VgFtS<<<6 zr+7{ioG6o^Y_NE2ePG_aWD?MxNnLQEJ1BF7Q)kU(cXi$T2fuSR?fOUZ5uFu0gV#2> zVDiq`7A~fN(wsrJQN>}|AOVjSmgIR>WWz;H*tc134Vl299xnvP+7=1goXoV88&;z0 zYgPMf)oMB@)pWq4pQ)JhSe-Vad_E_sN_cgwCf&VecO_@eXK$fo|L|lLR$BOF)B>LU zjpsb)iU0vi{MGLHk+w8Q>=N(?V9&W+y816uuZ#s-$W^2LPPYV#Zs2yLKg>%>WiOSsfd0<=xrlsH5+RDvfa&M2PZc#J&; z#Ha89?fsYl;PTOrYoC8;3 zV(X#vjbqoH#=cz%T3%zn#QUbxZhz~y_7qa9Uc(F46_WXd2MXFve~(`0w!DVB-8tBG zTc0|+^)QZKb?OhCmM7;}sRcE!t#Em(>L1wO@yBj5ksH{7+YamlhN|0pfp33CI7~aT z?*<}9$R_g(!?20bP9NS#`?$+g{;Y?f&X(Pv=I`w|E!G^kEn*VKL70^Lb;qeweImjq zyAR!JP+IsxLHQ@Cimw!OKd8Aag;6PWe!%Nks6VEN3}Vd(Qv!xda5=qXf?XHOFx^IKS;E{R2~^Y1Fh=MIS}P|{JR=Mtq9mKlEzX~X;% zV+O80!?XdLzovSI^O2bDlW~P)X!4d~GOjbFG(;B`1Zm<7(x_v4AE{1!f;8?}KBSi~ zkt!L#rwpNUFJ?=t+FD5BY_?P*g=V&J2xGa6^p~PHi<(^IwD`spVtF+?oUoNBY78TZ z_wY9VWAWPw@9?w2tQpqzE}3!yuSDODFna>|#WWwrVR0`%cF&4?D$mh6pkv;vKjz8plT$jRiMoggi EKeHrCNdN!< diff --git a/planet-test/planet-test-service/src/main/java/com/neon/planet/test/controller/TestController.java b/planet-test/planet-test-service/src/main/java/com/neon/planet/test/controller/TestController.java index 43b58f9..00fbec2 100644 --- a/planet-test/planet-test-service/src/main/java/com/neon/planet/test/controller/TestController.java +++ b/planet-test/planet-test-service/src/main/java/com/neon/planet/test/controller/TestController.java @@ -1,5 +1,8 @@ package com.neon.planet.test.controller; +//import com.neon.planet.core.model.anno.Log; +import com.neon.planet.core.model.anno.AllCheckNull; +import com.neon.planet.core.model.anno.Log; import com.neon.planet.core.model.domain.ResponseResult; import com.neon.planet.core.model.factory.ResponseResultFactory; import com.neon.planet.test.dao.entity.NenoUser; @@ -10,6 +13,7 @@ import com.neon.planet.test.service.TestService; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; +import java.lang.reflect.Array; import java.util.Map; /** @@ -26,11 +30,16 @@ public class TestController { private final UserInfoCacheManager userInfoCacheManager; +// private final String className = String.valueOf(TestController.class); + @PostMapping("/login") - public ResponseResult> userLogin(@RequestBody User user){ + @Log(value="用户登录测试", ref="test-1") + @AllCheckNull(params = "") + public ResponseResult> userLogin (String users, String pass, User user){ + System.out.println(TestController.class); System.out.println("login!"); - Map tokenMap = testService.userLogin(user.getUsername(),user.getPassword()); + Map tokenMap = testService.userLogin(users, String.valueOf(12345)); return ResponseResultFactory.ok(tokenMap); } diff --git a/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/PlanetTestApplication.java b/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/PlanetTestApplication.java deleted file mode 100644 index 447457b..0000000 --- a/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/PlanetTestApplication.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xxxx.planet.test; - -import org.mybatis.spring.annotation.MapperScan; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cache.annotation.EnableCaching; -import org.springframework.cloud.client.discovery.EnableDiscoveryClient; -import org.springframework.cloud.openfeign.EnableFeignClients; - -/** - * 测试启动类 - * @author : LJJ - * @date : 2023/9/21 19:12 - */ -@SpringBootApplication(scanBasePackages = {"com.xxxx.planet"}) -//@MapperScan("com.xxxx.planet.test.dao.mapper") -@EnableDiscoveryClient -@EnableCaching -@EnableFeignClients(basePackages = {"com.xxxx.planet.test.feign"}) -public class PlanetTestApplication { - - public static void main(String[] args) { - SpringApplication.run(PlanetTestApplication.class,args); - } - -} diff --git a/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/controller/TestController.java b/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/controller/TestController.java deleted file mode 100644 index d5638d7..0000000 --- a/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/controller/TestController.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.xxxx.planet.test.controller; - -import com.xxxx.planet.core.model.domain.RestResp; -import com.xxxx.planet.test.dao.entity.NenoUser; -import com.xxxx.planet.test.manager.cache.UserInfoCacheManager; -import com.xxxx.planet.test.manager.feign.UserFeignManager; -import com.xxxx.planet.test.model.dto.User; -import com.xxxx.planet.test.service.TestService; -import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.*; - -import java.util.Map; - -/** - * 测试接口 - * @author : LJJ - * @date : 2023/9/21 21:21 - */ -@RestController -@RequestMapping("/api/front/test") -@RequiredArgsConstructor -public class TestController { - - private final TestService testService; - - private final UserFeignManager userFeignManager; - - private final UserInfoCacheManager userInfoCacheManager; - - - @PostMapping("/login") - public RestResp> userLogin(@RequestBody User user){ - System.out.println("login!"); - Map tokenMap = testService.userLogin(user.getUsername(),user.getPassword()); - return RestResp.ok(tokenMap); - } - - @GetMapping("/all") - public RestResp getTest(){ - return RestResp.ok(); - } - - /** - * 测试远程调用是否有用 - * @param username - * @param password - * @return - */ - @GetMapping("/ceshi") - public RestResp> testFeignLogin(String username,String password){ - return userFeignManager.testFeignLogin(username,password); - } - - @GetMapping("/qinchu") - public RestResp testQinCHu(String username){ - NenoUser user = userInfoCacheManager.getUserInfo(username); - return RestResp.ok(user); - /*if(0==flag){ - userInfoCacheManager.evictCache(); - }else if(1==flag){ - userInfoCacheManager.evictCacheX(username); - }else { - RestResp.error(); - } - return RestResp.ok();*/ - } - -} diff --git a/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/dao/entity/NenoUser.java b/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/dao/entity/NenoUser.java deleted file mode 100644 index 457a03b..0000000 --- a/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/dao/entity/NenoUser.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xxxx.planet.test.dao.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -import java.io.Serializable; - -/** - * @author : LJJ - * @date : 2023/9/21 21:31 - */ -@Data -@TableName("t_neno_user") -public class NenoUser implements Serializable { - - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - private String username; - - private String password; - -} diff --git a/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/dao/mapper/NenoMapper.java b/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/dao/mapper/NenoMapper.java deleted file mode 100644 index acf5c48..0000000 --- a/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/dao/mapper/NenoMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.xxxx.planet.test.dao.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.xxxx.planet.test.dao.entity.NenoUser; -import org.apache.ibatis.annotations.Mapper; - -/** - * @author : LJJ - * @date : 2023/9/21 21:34 - */ -@Mapper -public interface NenoMapper extends BaseMapper { -} diff --git a/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/manager/cache/UserInfoCacheManager.java b/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/manager/cache/UserInfoCacheManager.java deleted file mode 100644 index ed00b23..0000000 --- a/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/manager/cache/UserInfoCacheManager.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.xxxx.planet.test.manager.cache; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.xxxx.planet.core.constant.ErrorCodeEnum; -import com.xxxx.planet.core.exception.BusinessException; -import com.xxxx.planet.redis.constant.CacheConsts; -import com.xxxx.planet.test.dao.entity.NenoUser; -import com.xxxx.planet.test.dao.mapper.NenoMapper; -import lombok.RequiredArgsConstructor; -import org.springframework.cache.annotation.CacheEvict; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.data.redis.core.StringRedisTemplate; -import org.springframework.stereotype.Component; - -/** - * @author : LJJ - * @date : 2023/9/21 21:34 - */ -@Component -@RequiredArgsConstructor -public class UserInfoCacheManager { - - private final NenoMapper nenoMapper; - private final StringRedisTemplate stringRedisTemplate; - - @Cacheable(cacheManager = CacheConsts.REDIS_CACHE_MANAGER, - value = CacheConsts.USER_INFO_CACHE_NAME) - public NenoUser getUserInfo(String username){ - NenoUser user = nenoMapper.selectOne(new QueryWrapper().eq("username",username)); - if(null==user){ - throw new BusinessException(ErrorCodeEnum.USER_ACCOUNT_NOT_EXIST); - } - return user; - } - - - @CacheEvict(cacheManager = CacheConsts.REDIS_CACHE_MANAGER, - value = CacheConsts.USER_INFO_CACHE_NAME) - public void evictCache(){ - - } - - @CacheEvict(cacheManager = CacheConsts.REDIS_CACHE_MANAGER, - value = CacheConsts.USER_INFO_CACHE_NAME) - public void evictCacheX(String username){ - - } - -} diff --git a/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/manager/feign/UserFeignManager.java b/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/manager/feign/UserFeignManager.java deleted file mode 100644 index 102e2f0..0000000 --- a/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/manager/feign/UserFeignManager.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.xxxx.planet.test.manager.feign; - -import com.xxxx.planet.core.model.domain.RestResp; -import com.xxxx.planet.test.feign.TestFeign; -import com.xxxx.planet.test.model.dto.User; -import lombok.AllArgsConstructor; -import org.springframework.stereotype.Component; - -import java.util.Map; - -/** - * 测试远程调用 - * @author : LJJ - * @date : 2023/9/23 19:41 - */ -@Component -@AllArgsConstructor -public class UserFeignManager { - - private final TestFeign testFeign; - - public RestResp> testFeignLogin(String username,String password){ - System.out.println("测试远程调用"); - User user = new User(); - user.setUsername(username); - user.setPassword(password); - return testFeign.userLogin(user); - } - -} diff --git a/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/service/TestService.java b/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/service/TestService.java deleted file mode 100644 index 1268ea9..0000000 --- a/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/service/TestService.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.xxxx.planet.test.service; - -import java.util.Map; - -/** - * @author : LJJ - * @date : 2023/9/21 21:25 - */ -public interface TestService { - - /** - * 测试登录 - * @param username - * @param password - * @return - */ - Map userLogin(String username, String password); - -} diff --git a/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/service/impl/TestServiceImpl.java b/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/service/impl/TestServiceImpl.java deleted file mode 100644 index 91d4169..0000000 --- a/planet-test/planet-test-service/src/main/java/com/xxxx/planet/test/service/impl/TestServiceImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.xxxx.planet.test.service.impl; - -import com.xxxx.planet.security.auth.JwtUtils; -import com.xxxx.planet.test.dao.entity.NenoUser; -import com.xxxx.planet.test.manager.cache.UserInfoCacheManager; -import com.xxxx.planet.test.service.TestService; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author : LJJ - * @date : 2023/9/21 21:27 - */ -@Service -@RequiredArgsConstructor -public class TestServiceImpl implements TestService { - - private final UserInfoCacheManager userInfoCacheManager; - - /** - * 测试登录 - * @param username - * @param password - * @return - */ - @Override - public Map userLogin(String username, String password) { - NenoUser user = userInfoCacheManager.getUserInfo(username); - Map tokenMap = new HashMap<>(); - tokenMap.put("token", JwtUtils.generateToken((long)user.getId(), "user")); - return tokenMap; - } - -} diff --git a/planet-test/planet-test-service/src/main/resources/application-dev.yml b/planet-test/planet-test-service/src/main/resources/application-dev.yml index f2e413a..10aa219 100644 --- a/planet-test/planet-test-service/src/main/resources/application-dev.yml +++ b/planet-test/planet-test-service/src/main/resources/application-dev.yml @@ -8,7 +8,7 @@ spring: name: test-service # 连接池配置 datasource: - url: jdbc:mysql://192.168.242.129:3306/store_user?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useUnicode=true&useSSL=false + url: jdbc:mysql://192.168.242.131:3306/store_user?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useUnicode=true&useSSL=false username: root password: 123456 driver-class-name: com.mysql.cj.jdbc.Driver @@ -16,7 +16,7 @@ spring: # Redis redis: port: 6379 - host: 192.168.242.129 + host: 192.168.242.131 timeout: 3000 database: 0 diff --git a/planet-test/planet-test-service/target/classes/application-dev.yml b/planet-test/planet-test-service/target/classes/application-dev.yml index f2e413a..10aa219 100644 --- a/planet-test/planet-test-service/target/classes/application-dev.yml +++ b/planet-test/planet-test-service/target/classes/application-dev.yml @@ -8,7 +8,7 @@ spring: name: test-service # 连接池配置 datasource: - url: jdbc:mysql://192.168.242.129:3306/store_user?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useUnicode=true&useSSL=false + url: jdbc:mysql://192.168.242.131:3306/store_user?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useUnicode=true&useSSL=false username: root password: 123456 driver-class-name: com.mysql.cj.jdbc.Driver @@ -16,7 +16,7 @@ spring: # Redis redis: port: 6379 - host: 192.168.242.129 + host: 192.168.242.131 timeout: 3000 database: 0 diff --git a/planet-test/planet-test-service/target/classes/com/neon/planet/test/controller/TestController.class b/planet-test/planet-test-service/target/classes/com/neon/planet/test/controller/TestController.class index 6e08ae6ae6eee1481a356e1b5c1ee86c4830e681..d754cc5eb713c4ff3df69b8e484741cbcba1138b 100644 GIT binary patch delta 1125 zcmZuvOHUI~7(I9T7-pDOs8mG(i;6;99x9@MuZr&%sEF^!fTe(?V5i{9bZg?uj3l}+ z(VaUHEWV-}cgBr>L8G{E?ZQOkxid9U!{VFo-tV6Co$oR4tG-wFzWep^4S-f$*Kim| zR2@O3>~X_ch;ymCRZKA^V|L;q#80mSz7GZ^YAokRO!~qRuY!RkfIz%vkf` zu~a81^LHM7x%q7V-mA~Ar@jzs_ z5d&9|RxxT|DKaX?42Da#M%FU2j*))@k(&}jn z^`i83q{m2zpM$W_h$g4ks>|g~uktkNs!(Lb z<#|_Jlf*yk|!JL)0c5Ac4Fy6*4~{RV!1qlW+h delta 1022 zcmZuvOHUI~7(I8|GVOFIwGXO@`=jnl?fBnQ`UJI@M{P6lfyY)Ft3f#PbvEFHPM7{y^)$B8x>)BbQswWMcvWdEZJ@doDzU z`Q6=8aG-|vFT=(U*!Kp)r>wyid<%PM4Gxa7_fTyZ39rNXiX}Ge=IpV`>)}KL<3{Wu zR$sgVwWwpn%dnS2Fz;Zl0SfB?eG6$KQrJ((Ay^4Cb0|1~7Ooyv1vpw~AaV#IL`)R~ z!rTb7Awn{#Ji5*OXxi{4Eov{ou9cHQ?M6~}p`A17EYo1W!r z=jso>qms}n?7{FVEofVX{+jr9cm0+Q^O+~yDSIxr@yUDnp1pj=URIv8>IW=NALBvB Kr^r?``}7}=!;QKC diff --git a/planet-test/planet-test-service/target/classes/com/xxxx/planet/test/PlanetTestApplication.class b/planet-test/planet-test-service/target/classes/com/xxxx/planet/test/PlanetTestApplication.class deleted file mode 100644 index 424fcda742bbbd8b60dd8eb4fbde35c7157bdb19..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1051 zcma)5TW=CU6#jdKg%bL z5B>mul<~}hmYOwjl07r$_MPkg`1$QSfPFkGA&&uJ z`K}pBhDuLq`7W7yGCCGsNRnF5_#zyNNI8BX%-e~I8J_oiGv$|b_$(A!T5e@*c|Uz0 z)AMjP3zaXdGP+GMrb20kt;T8ZOk4;~W&t1ANa>)R<{+YgP&YEv4Ar;NPRyt;A~BU# zMr2qTm?ZM$k#c#~Go!X#AcpM^iMDDghbmT7#i7>5rdbinLC-`1k7q88u>=2TqI2#U zW4TDI@r@pw-(1M(6Mv&!uV4S>yQ!WUxStIo{E6h^PfZK=E{R=d8D3_)rLoOS>akRTUU(h3 z_dH-su4V69UG=}}YPos0QvWhmvBuE+|BWbMr;J@ZrP*Gs!+Y;c`j&A1Ih6SrmPSA; z93`|@USnykx}k{UcE%>{WjDiUD=#hYE~f4JzZ8PRPTj^1a`Y#;lLK=V6D<(O>1K4V zHot&bo0L>k~OS>0R0DB>0> oB(Ku9%7}5<+)il?8+7kdj++$j&M8=oEdl@m0NW(1r?UIM0I_c>UjP6A diff --git a/planet-test/planet-test-service/target/classes/com/xxxx/planet/test/controller/TestController.class b/planet-test/planet-test-service/target/classes/com/xxxx/planet/test/controller/TestController.class deleted file mode 100644 index 58205ac3e1830732ab6ca1850ac9d992bf781c63..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3592 zcmb_f`+5^a6#q?#a3EC8u&jayZbb={ z7Am?fzvrK9c#f|^X^v$xK9{$;yfXs%7U`FjTk{tk->IoUU^@AJJwBIfhFRX;c8#J6 zM$|QbP0u@(b=47fes6IV!yJj*ew8A#M&yF7xxPTTxQifNRi3PdIubH7zJsfx110M* zm##amFPG^8J`HNf%=19t(1Po$>#h2#3T`>89w{RWy5e{%PT-n-o0tjL-KM~)9XcWp zSF|4n+VfNpIeEUbHF}IC0wGIljSgQ{n|_q<;LngRS9S2C@{aM!gXC;assEWLKV=&Y?)DZ!d5_6{P_Gm z--fnj)KelgSdT8Z{Lrnd6}Ra!Fc*Dahfe5fpP;7~bWoGchB0-`*z!;Z8}gxAm8-5_ zl}?9OF6m}SXEuya1O^^BUWu64sn8Umz*KRc z*?M7L7ka(AqTOl~>oZU7qbsV%MH%UMp1`n4^r&65t8%&6lTtgAtWDXcnM0;ne8$g| zVU+#7In3&4IL#(wTNU`>x$A%S)Etx*)m(Q4a>h$HU4Q;+OW;BR!hQN%Kkd>lh|f%@z6q49>_2AB z-k0{6DB~*(PFc5tin{EYE`Qh*Vz*IGnPd|<_tZ6FCQ0`?-LapmQB&x4p+nMXxN!g}XMs#y9kA)Rx99d~4%7I5u9uh=o-f6;y2~R4uI8co8)V>o#26Ge1){4x?aU z!^V3!ZDSNiEO<8R@NLXNv;8D~C+s@KI48Qb7*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0(9KnmuPC#`7madlc}{5_u5XFFN@wV2Xr41|Q)L*EiN?vDr9yIzA(E37 zCodLEU7FZgXeTw641FsVTbY(vGhLHv_Q1BKGL$K8LL-%xPLaE1&6*7j62bh0y9AYx zYP&4>ytK;F7Pd+UaVv@`OcMuw?C%`EdvpBl?a}Ve@!rd$*SkT?L~$Fl48sk1T;o}- zGEofTP84@B8^t}{T|jFP=_uxKpJA%8hrhCjO8tj8Ra{Sra@&-X#o(6}MMzbvWJ z&3t4LBb$CY!T?FhaW@UU)Gkr;;W8-?;tI|52{SbMXpE!|sg3O;^xo6b$7uH4c6edC dt6C>vBVNAD3(>@A(M}3iJ<}mvs~HaizW^^^ny&x= diff --git a/planet-test/planet-test-service/target/classes/com/xxxx/planet/test/service/TestService.class b/planet-test/planet-test-service/target/classes/com/xxxx/planet/test/service/TestService.class deleted file mode 100644 index 8bfe663f0f179eee1b01994d0a8527109561d361..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 378 zcmbVI%TB{E5S$IAY05+WjB>#jI0bR!)C#2Z#>u3s;3~BvdsFx}4txL~h1k#om3qU{ z$~&X6XLi57KRyB6;4;T~jtfH3CytBII8V5pFE(~(O>2E)Dv8cF+8Rr>$d*=f7<^ diff --git a/planet-test/planet-test-service/target/classes/com/xxxx/planet/test/service/impl/TestServiceImpl.class b/planet-test/planet-test-service/target/classes/com/xxxx/planet/test/service/impl/TestServiceImpl.class deleted file mode 100644 index 70b7004cf0b4043455731c78f2ad113eb9bed8a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1866 zcmbVN>vG#f6#mwBqF7Nw>!yJ~xunqIIJ8S?(wl>!1WFy8q>u~4@N462Y_+!Jkya^v z0G@+afEh>&%;LT%EvK7uRro5;t(u#T2B2x`Sm09|}w-v5uO-ez>CAUA?9P)zOi_ zjaEDC%kTJ;gPsbskw(Wx_J`-PZJFhEj%Zz=Y$01=#}5RSs;ztKKuKbB7%Ey=ez&8zn+Y{anT_*%%7U zew8rPeZAwyJ`3Si5QIhwd-r9`aOlu5#&T2ubq^|3xuen>=97N>D@-OX0@rd`|2y6SlO1hrsoEJJ(8wu}`TS(&mwT~lGnj9A zjs#;%{Z01Pnd)c?q@$u47|lV%iXJ8vj^^)>Vn=%GC#Eo5P5;bfTjJ9Vw%?Y#R$)%?2n1%QWI>z-9G~ zNCY}6u5=g_2Z<55o`oCraRzWi$pVf@nB(N10*4BpimhW_2!(Wgn%BTIcR!$nF@9z3 zXNZME6xM%7@ta2|-7L+PDq|N9F@6Z=`^T85lpn+W6_Z7LJzM&bB1N3xyFviqO_cE# z*K@pO&S8d>#UU(S#w*-W0cP5.8.5 3.1.1 1.2.58 + 3.1.2 @@ -65,6 +66,12 @@ import + + org.springframework.boot + spring-boot-starter-aop + ${aop.version} + + mysql mysql-connector-java -- Gitee