소스 검색

1、修改reeadme.md注释
2、调整类中代码格式

zk 2 년 전
부모
커밋
16edefe264

+ 12 - 9
README.md

@@ -20,7 +20,7 @@
 | 功能          | 本框架                                                                                                    |
 | 功能          | 本框架                                                                                                    |
 |-------------|--------------------------------------------------------------------------------------------------------|
 |-------------|--------------------------------------------------------------------------------------------------------|
 | 前端项目        | 基于vue3 + Element UI                                                                                    
 | 前端项目        | 基于vue3 + Element UI                                                                                    
-| 后端项目结构      | 采用插件化 + 扩展包形式 结构解耦 易于扩展                                                                                |
+| *后端项目结构      | 采用插件化 + 扩展包形式 结构解耦 易于扩展                                                                                |
 | *后端代码风格     | 严格遵守Alibaba规范与项目统一配置的代码格式化                                                                             |
 | *后端代码风格     | 严格遵守Alibaba规范与项目统一配置的代码格式化                                                                             |
 | *分布式注册/配置中心 | 采用 Alibaba Nacos 源码集成便于调试扩展与二次开发 框架还为其增加了各种监控                                                          |
 | *分布式注册/配置中心 | 采用 Alibaba Nacos 源码集成便于调试扩展与二次开发 框架还为其增加了各种监控                                                          |
 | *服务网关       | 采用 SpringCloud Gateway 框架扩展了多种功能例如:内网鉴权、请求体缓存、跨域配置、请求响应日志等                                             |
 | *服务网关       | 采用 SpringCloud Gateway 框架扩展了多种功能例如:内网鉴权、请求体缓存、跨域配置、请求响应日志等                                             |
@@ -51,7 +51,7 @@
 | *文件存储       | 采用 Minio 分布式文件存储 天生支持多机、多硬盘、多分片、多副本存储支持权限管理 安全可靠 文件可加密存储(采用的aliyun-oss)                                |
 | *文件存储       | 采用 Minio 分布式文件存储 天生支持多机、多硬盘、多分片、多副本存储支持权限管理 安全可靠 文件可加密存储(采用的aliyun-oss)                                |
 | *短信         | 使用 spring-cloud-alicloud-sms                                                                           |
 | *短信         | 使用 spring-cloud-alicloud-sms                                                                           |
 | 短链接         | 购买现成产品                                                                                                 |
 | 短链接         | 购买现成产品                                                                                                 |
-| 接口文档        | 沿用现有接口文档系统                                                                                             |
+| *接口文档        | 沿用现有接口文档系统                                                                                             |
 | 校验框架        | 采用 Validation 支持注解与工具类校验 注解支持国际化                                                                       |
 | 校验框架        | 采用 Validation 支持注解与工具类校验 注解支持国际化                                                                       |
 | *Excel框架    | 采用 Alibaba EasyExcel 基于插件化框架对其增加了很多功能 例如 自动合并相同内容 自动排列布局 字典翻译等                                         |
 | *Excel框架    | 采用 Alibaba EasyExcel 基于插件化框架对其增加了很多功能 例如 自动合并相同内容 自动排列布局 字典翻译等                                         |
 | *工具类框架      | 采用 Hutool、Lombok 上百种工具覆盖90%的使用需求 基于注解自动生成 get set 等简化框架大量代码                                            |
 | *工具类框架      | 采用 Hutool、Lombok 上百种工具覆盖90%的使用需求 基于注解自动生成 get set 等简化框架大量代码                                            |
@@ -65,9 +65,6 @@
 
 
 ~~~
 ~~~
 sckw-service-platform     
 sckw-service-platform     
-├── sckw-api         				 // api接口服务
-│       └── sckw-app-api                         // app端api接口服务 [8010]
-│       └── sckw-web-api                         // web端api接口服务 [8020]
 ├── sckw-gateway         				// 网关服务 [10010]
 ├── sckw-gateway         				// 网关服务 [10010]
 ├── sckw-auth            				// 登录认证中心 [10160]
 ├── sckw-auth            				// 登录认证中心 [10160]
 ├── sckw-modules                                // 业务模块
 ├── sckw-modules                                // 业务模块
@@ -86,16 +83,22 @@ sckw-service-platform
 │       └── sckw-task                           // 定时任务服务 [10150]
 │       └── sckw-task                           // 定时任务服务 [10150]
 │       └── sckw-xxx                            // xxxx服务 [10040]
 │       └── sckw-xxx                            // xxxx服务 [10040]
 ├── sckw-modules-api                    // 接口模块
 ├── sckw-modules-api                    // 接口模块
+│       └── sckw-modules-bom                    // modules依赖项
+│       └── sckw-message-api                    // 消息服务接口
 │       └── sckw-system-api                     // 系统基础服务接口
 │       └── sckw-system-api                     // 系统基础服务接口
-│       └── sckw-file-api                     // 系统文件服务接口
-├── sckw-ops          				    // 运维中心
+│       └── sckw-file-api                       // 系统文件服务接口
 ├── sckw-common          				// 通用模块
 ├── sckw-common          				// 通用模块
+│       └── sckw-common-bom                     // common依赖项
 │       └── sckw-common-core                    // 核心模块
 │       └── sckw-common-core                    // 核心模块
 │       └── sckw-common-datasource              // 多数据源
 │       └── sckw-common-datasource              // 多数据源
 │       └── sckw-common-log                     // 日志记录
 │       └── sckw-common-log                     // 日志记录
 │       └── sckw-common-redis                   // 缓存服务
 │       └── sckw-common-redis                   // 缓存服务
-│       └── sckw-common-message                 // 消息推送服务
 │       └── sckw-common-remote                  // 资源包
 │       └── sckw-common-remote                  // 资源包
 │       └── sckw-common-sidecar                 // 多语言微服务异构
 │       └── sckw-common-sidecar                 // 多语言微服务异构
-│       └── sckw-common-stream                  // 消息驱动服务
+│       └── sckw-common-stream                  // 消息驱动
+│       └── sckw-common-mongo                   // mongodb
+│       └── sckw-common-xxljob                  // 任务调度
+│       └── sckw-common-excel                   // excel导入导出
+│       └── sckw-common-sentinel                // 分布式限流熔断
+│       └── sckw-common-seata                   // 分布式事务
 ~~~
 ~~~

+ 2 - 2
pom.xml

@@ -305,11 +305,11 @@
                 <version>${xxljob.version}</version>
                 <version>${xxljob.version}</version>
             </dependency>
             </dependency>
 
 
-            <dependency>
+            <!--<dependency>
                 <groupId>org.aspectj</groupId>
                 <groupId>org.aspectj</groupId>
                 <artifactId>aspectjweaver</artifactId>
                 <artifactId>aspectjweaver</artifactId>
                 <version>1.9.19</version>
                 <version>1.9.19</version>
-            </dependency>
+            </dependency>-->
 
 
             <dependency>
             <dependency>
                 <groupId>org.bouncycastle</groupId>
                 <groupId>org.bouncycastle</groupId>

+ 5 - 1
sckw-common/sckw-common-core/pom.xml

@@ -134,9 +134,13 @@
             <artifactId>fastjson</artifactId>
             <artifactId>fastjson</artifactId>
         </dependency>
         </dependency>
 
 
-        <dependency>
+        <!--<dependency>
             <groupId>org.aspectj</groupId>
             <groupId>org.aspectj</groupId>
             <artifactId>aspectjweaver</artifactId>
             <artifactId>aspectjweaver</artifactId>
+        </dependency>-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-aop</artifactId>
         </dependency>
         </dependency>
 
 
         <dependency>
         <dependency>

+ 3 - 2
sckw-common/sckw-common-core/src/main/java/com/sckw/core/aspect/DaoAspect.java

@@ -5,20 +5,21 @@ import com.sckw.core.model.constant.Global;
 import com.sckw.core.utils.BeanUtils;
 import com.sckw.core.utils.BeanUtils;
 import com.sckw.core.utils.CollectionUtils;
 import com.sckw.core.utils.CollectionUtils;
 import com.sckw.core.utils.IdWorker;
 import com.sckw.core.utils.IdWorker;
+import jakarta.servlet.http.HttpServletRequest;
 import org.aspectj.lang.ProceedingJoinPoint;
 import org.aspectj.lang.ProceedingJoinPoint;
 import org.aspectj.lang.annotation.Around;
 import org.aspectj.lang.annotation.Around;
 import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.annotation.Pointcut;
 import org.aspectj.lang.annotation.Pointcut;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Component;
-
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
 import java.util.Date;
 import java.util.Date;
 import java.util.List;
 import java.util.List;
 import java.util.Objects;
 import java.util.Objects;
 
 
 /**
 /**
  * DAO切面,插入创建人,创建时间,修改人,修改时间
  * DAO切面,插入创建人,创建时间,修改人,修改时间
- *
  * @author zk
  * @author zk
  * @date Oct 29, 2018
  * @date Oct 29, 2018
  */
  */

+ 4 - 2
sckw-common/sckw-common-core/src/main/java/com/sckw/core/utils/CollectionUtils.java

@@ -242,16 +242,18 @@ public class CollectionUtils extends CollectionUtil {
 	public static Set<Map.Entry<String, Integer>> valueSort(Map<String, Integer> params){
 	public static Set<Map.Entry<String, Integer>> valueSort(Map<String, Integer> params){
 		Set<Map.Entry<String, Integer>> treeSet = new TreeSet<Map.Entry<String, Integer>>(
 		Set<Map.Entry<String, Integer>> treeSet = new TreeSet<Map.Entry<String, Integer>>(
 				new Comparator<Map.Entry<String, Integer>>() {
 				new Comparator<Map.Entry<String, Integer>>() {
+					@Override
 					public int compare(Map.Entry<String, Integer> o1,
 					public int compare(Map.Entry<String, Integer> o1,
 									   Map.Entry<String, Integer> o2) {
 									   Map.Entry<String, Integer> o2) {
 						Integer d1 = o1.getValue();
 						Integer d1 = o1.getValue();
 						Integer d2 = o2.getValue();
 						Integer d2 = o2.getValue();
 						int r = d2.compareTo(d1);
 						int r = d2.compareTo(d1);
 
 
-						if (r != 0)
+						if (r != 0) {
 							return r;
 							return r;
-						else
+						} else {
 							return o2.getKey().compareTo(o1.getKey());
 							return o2.getKey().compareTo(o1.getKey());
+						}
 					}
 					}
 				});
 				});
 		treeSet.addAll(params.entrySet());
 		treeSet.addAll(params.entrySet());

+ 1 - 0
sckw-common/sckw-common-excel/src/main/java/com/sckw/excel/utils/DateUtil.java

@@ -389,6 +389,7 @@ public class DateUtil {
             this.index = index;
             this.index = index;
         }
         }
 
 
+        @Override
         public String toString() {
         public String toString() {
             return "Week [name=" + this.name + ", enName=" + this.enName + ", index=" + this.index + "]";
             return "Week [name=" + this.name + ", enName=" + this.enName + ", index=" + this.index + "]";
         }
         }