Commit fffd023d31cffecade150c78aa1932ca245ae34a
1 parent
9bc9b2ac
多模块重构 5:infra 模块的迁移完成
Showing
20 changed files
with
93 additions
and
324 deletions
yudao-core-service/src/test/resources/application-unit-test.yaml deleted
| 1 | -spring: | |
| 2 | - main: | |
| 3 | - lazy-initialization: true # 开启懒加载,加快速度 | |
| 4 | - banner-mode: off # 单元测试,禁用 Banner | |
| 5 | - | |
| 6 | ---- #################### 数据库相关配置 #################### | |
| 7 | - | |
| 8 | -spring: | |
| 9 | -# sql: | |
| 10 | -# init: | |
| 11 | -# schema-locations: classpath:sql/create_tables.sql | |
| 12 | -# username: sa | |
| 13 | -# password: | |
| 14 | -# enabled: true | |
| 15 | - # 数据源配置项 | |
| 16 | - datasource: | |
| 17 | - name: ruoyi-vue-pro | |
| 18 | - url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 | |
| 19 | - driver-class-name: org.h2.Driver | |
| 20 | - username: sa | |
| 21 | - password: | |
| 22 | - schema: classpath:sql/create_tables.sql # MySQL 转 H2 的语句,使用 https://www.jooq.org/translate/ 工具 | |
| 23 | - druid: | |
| 24 | - async-init: true # 单元测试,异步初始化 Druid 连接池,提升启动速度 | |
| 25 | - initial-size: 1 # 单元测试,配置为 1,提升启动速度 | |
| 26 | - | |
| 27 | - # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 | |
| 28 | - redis: | |
| 29 | - host: 127.0.0.1 # 地址 | |
| 30 | - port: 16379 # 端口(单元测试,使用 16379 端口) | |
| 31 | - database: 0 # 数据库索引 | |
| 32 | - integration: | |
| 33 | - jdbc: | |
| 34 | - initialize-schema: | |
| 35 | - | |
| 36 | -mybatis: | |
| 37 | - lazy-initialization: true # 单元测试,设置 MyBatis Mapper 延迟加载,加速每个单元测试 | |
| 38 | - | |
| 39 | ---- #################### 定时任务相关配置 #################### | |
| 40 | - | |
| 41 | ---- #################### 配置中心相关配置 #################### | |
| 42 | - | |
| 43 | ---- #################### 服务保障相关配置 #################### | |
| 44 | - | |
| 45 | -# Lock4j 配置项(单元测试,禁用 Lock4j) | |
| 46 | - | |
| 47 | -# Resilience4j 配置项 | |
| 48 | - | |
| 49 | ---- #################### 监控相关配置 #################### | |
| 50 | - | |
| 51 | ---- #################### 芋道相关配置 #################### | |
| 52 | - | |
| 53 | -# 芋道配置项,设置当前项目所有自定义的配置 |
yudao-core-service/src/test/resources/application.yaml deleted
| 1 | -spring: | |
| 2 | - application: | |
| 3 | - name: yudao-core-service | |
| 4 | - | |
| 5 | - # Jackson 配置项 | |
| 6 | - jackson: | |
| 7 | - serialization: | |
| 8 | - write-dates-as-timestamps: true # 设置 Date 的格式,使用时间戳 | |
| 9 | - write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401 | |
| 10 | - write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳 | |
| 11 | - fail-on-empty-beans: false # 允许序列化无属性的 Bean | |
| 12 | - | |
| 13 | -# MyBatis Plus 的配置项 | |
| 14 | -mybatis-plus: | |
| 15 | - configuration: | |
| 16 | - map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。 | |
| 17 | - log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 打印日志 | |
| 18 | - global-config: | |
| 19 | - db-config: | |
| 20 | - id-type: AUTO # 自增 ID | |
| 21 | - logic-delete-value: 1 # 逻辑已删除值(默认为 1) | |
| 22 | - logic-not-delete-value: 0 # 逻辑未删除值(默认为 0) | |
| 23 | - mapper-locations: classpath*:mapper/*.xml | |
| 24 | - type-aliases-package: ${yudao.core-service.base-package}.modules.*.dal.dataobject | |
| 25 | - | |
| 26 | ---- #################### 芋道相关配置 #################### | |
| 27 | - | |
| 28 | -yudao: | |
| 29 | - info: | |
| 30 | - version: 1.0.0 | |
| 31 | - base-package: cn.iocoder.yudao.coreservice | |
| 32 | - core-service: | |
| 33 | - base-package: cn.iocoder.yudao.coreservice | |
| 34 | - | |
| 35 | -debug: false |
yudao-core-service/src/test/resources/file/erweima.jpg deleted
18 KB
yudao-core-service/src/test/resources/logback-spring.xml deleted
yudao-core-service/src/test/resources/sql/clean.sql deleted
| 1 | --- inf 开头的 DB | |
| 2 | -DELETE FROM "inf_api_access_log"; | |
| 3 | -DELETE FROM "inf_file"; | |
| 4 | -DELETE FROM "inf_api_error_log"; | |
| 5 | - | |
| 6 | --- sys 开头的 DB | |
| 7 | -DELETE FROM "sys_user_session"; | |
| 8 | -DELETE FROM "sys_dict_data"; | |
| 9 | -DELETE FROM "sys_sms_template"; | |
| 10 | -DELETE FROM "sys_sms_log"; | |
| 11 | -DELETE FROM "sys_social_user"; |
yudao-core-service/src/test/resources/sql/create_tables.sql deleted
| 1 | --- inf 开头的 DB | |
| 2 | - | |
| 3 | -CREATE TABLE IF NOT EXISTS "inf_file" ( | |
| 4 | - "id" varchar(188) NOT NULL, | |
| 5 | - "type" varchar(63) DEFAULT NULL, | |
| 6 | - "content" blob NOT NULL, | |
| 7 | - "creator" varchar(64) DEFAULT '', | |
| 8 | - "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 9 | - "updater" varchar(64) DEFAULT '', | |
| 10 | - "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 11 | - "deleted" bit NOT NULL DEFAULT FALSE, | |
| 12 | - "tenant_id" bigint not null default '0', | |
| 13 | - PRIMARY KEY ("id") | |
| 14 | -) COMMENT '文件表'; | |
| 15 | - | |
| 16 | --- sys 开头的 DB | |
| 17 | - | |
| 18 | -CREATE TABLE IF NOT EXISTS `sys_user_session` ( | |
| 19 | - `id` varchar(32) NOT NULL, | |
| 20 | - `user_id` bigint DEFAULT NULL, | |
| 21 | - "user_type" tinyint NOT NULL, | |
| 22 | - `username` varchar(50) NOT NULL DEFAULT '', | |
| 23 | - `user_ip` varchar(50) DEFAULT NULL, | |
| 24 | - `user_agent` varchar(512) DEFAULT NULL, | |
| 25 | - `session_timeout` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 26 | - "creator" varchar(64) DEFAULT '', | |
| 27 | - "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 28 | - `updater` varchar(64) DEFAULT '' , | |
| 29 | - "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 30 | - "deleted" bit NOT NULL DEFAULT FALSE, | |
| 31 | - "tenant_id" bigint not null default '0', | |
| 32 | - PRIMARY KEY (`id`) | |
| 33 | -) COMMENT '用户在线 Session'; | |
| 34 | - | |
| 35 | -CREATE TABLE IF NOT EXISTS "sys_dict_data" ( | |
| 36 | - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | |
| 37 | - "sort" int NOT NULL DEFAULT '0', | |
| 38 | - "label" varchar(100) NOT NULL DEFAULT '', | |
| 39 | - "value" varchar(100) NOT NULL DEFAULT '', | |
| 40 | - "dict_type" varchar(100) NOT NULL DEFAULT '', | |
| 41 | - "status" tinyint NOT NULL DEFAULT '0', | |
| 42 | - "remark" varchar(500) DEFAULT NULL, | |
| 43 | - "creator" varchar(64) DEFAULT '', | |
| 44 | - "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 45 | - "updater" varchar(64) DEFAULT '', | |
| 46 | - "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 47 | - "deleted" bit NOT NULL DEFAULT FALSE, | |
| 48 | - PRIMARY KEY ("id") | |
| 49 | -) COMMENT '字典数据表'; | |
| 50 | - | |
| 51 | -CREATE TABLE IF NOT EXISTS "inf_api_access_log" ( | |
| 52 | - "id" bigint not null GENERATED BY DEFAULT AS IDENTITY, | |
| 53 | - "trace_id" varchar(64) not null default '', | |
| 54 | - "user_id" bigint not null default '0', | |
| 55 | - "user_type" tinyint not null default '0', | |
| 56 | - "application_name" varchar(50) not null, | |
| 57 | - "request_method" varchar(16) not null default '', | |
| 58 | - "request_url" varchar(255) not null default '', | |
| 59 | - "request_params" varchar(8000) not null default '', | |
| 60 | - "user_ip" varchar(50) not null, | |
| 61 | - "user_agent" varchar(512) not null, | |
| 62 | - "begin_time" timestamp not null, | |
| 63 | - "end_time" timestamp not null, | |
| 64 | - "duration" integer not null, | |
| 65 | - "result_code" integer not null default '0', | |
| 66 | - "result_msg" varchar(512) default '', | |
| 67 | - "creator" varchar(64) default '', | |
| 68 | - "create_time" timestamp not null default current_timestamp, | |
| 69 | - "updater" varchar(64) default '', | |
| 70 | - "update_time" timestamp not null default current_timestamp, | |
| 71 | - "deleted" bit not null default false, | |
| 72 | - "tenant_id" bigint not null default '0', | |
| 73 | - primary key ("id") | |
| 74 | -) COMMENT 'API 访问日志表'; | |
| 75 | - | |
| 76 | -CREATE TABLE IF NOT EXISTS "inf_api_error_log" ( | |
| 77 | - "id" integer not null GENERATED BY DEFAULT AS IDENTITY, | |
| 78 | - "trace_id" varchar(64) not null, | |
| 79 | - "user_id" bigint not null default '0', | |
| 80 | - "user_type" tinyint not null default '0', | |
| 81 | - "application_name" varchar(50) not null, | |
| 82 | - "request_method" varchar(16) not null, | |
| 83 | - "request_url" varchar(255) not null, | |
| 84 | - "request_params" varchar(8000) not null, | |
| 85 | - "user_ip" varchar(50) not null, | |
| 86 | - "user_agent" varchar(512) not null, | |
| 87 | - "exception_time" timestamp not null, | |
| 88 | - "exception_name" varchar(128) not null default '', | |
| 89 | - "exception_message" clob not null, | |
| 90 | - "exception_root_cause_message" clob not null, | |
| 91 | - "exception_stack_trace" clob not null, | |
| 92 | - "exception_class_name" varchar(512) not null, | |
| 93 | - "exception_file_name" varchar(512) not null, | |
| 94 | - "exception_method_name" varchar(512) not null, | |
| 95 | - "exception_line_number" integer not null, | |
| 96 | - "process_status" tinyint not null, | |
| 97 | - "process_time" timestamp default null, | |
| 98 | - "process_user_id" bigint default '0', | |
| 99 | - "creator" varchar(64) default '', | |
| 100 | - "create_time" timestamp not null default current_timestamp, | |
| 101 | - "updater" varchar(64) default '', | |
| 102 | - "update_time" timestamp not null default current_timestamp, | |
| 103 | - "deleted" bit not null default false, | |
| 104 | - "tenant_id" bigint not null default '0', | |
| 105 | - primary key ("id") | |
| 106 | -) COMMENT '系统异常日志'; | |
| 107 | - | |
| 108 | -CREATE TABLE IF NOT EXISTS "sys_sms_template" ( | |
| 109 | - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | |
| 110 | - "type" tinyint NOT NULL, | |
| 111 | - "status" tinyint NOT NULL, | |
| 112 | - "code" varchar(63) NOT NULL, | |
| 113 | - "name" varchar(63) NOT NULL, | |
| 114 | - "content" varchar(255) NOT NULL, | |
| 115 | - "params" varchar(255) NOT NULL, | |
| 116 | - "remark" varchar(255) DEFAULT NULL, | |
| 117 | - "api_template_id" varchar(63) NOT NULL, | |
| 118 | - "channel_id" bigint NOT NULL, | |
| 119 | - "channel_code" varchar(63) NOT NULL, | |
| 120 | - "creator" varchar(64) DEFAULT '', | |
| 121 | - "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 122 | - "updater" varchar(64) DEFAULT '', | |
| 123 | - "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 124 | - "deleted" bit NOT NULL DEFAULT FALSE, | |
| 125 | - PRIMARY KEY ("id") | |
| 126 | -) COMMENT '短信模板'; | |
| 127 | - | |
| 128 | -CREATE TABLE IF NOT EXISTS "sys_sms_log" ( | |
| 129 | - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | |
| 130 | - "channel_id" bigint NOT NULL, | |
| 131 | - "channel_code" varchar(63) NOT NULL, | |
| 132 | - "template_id" bigint NOT NULL, | |
| 133 | - "template_code" varchar(63) NOT NULL, | |
| 134 | - "template_type" tinyint NOT NULL, | |
| 135 | - "template_content" varchar(255) NOT NULL, | |
| 136 | - "template_params" varchar(255) NOT NULL, | |
| 137 | - "api_template_id" varchar(63) NOT NULL, | |
| 138 | - "mobile" varchar(11) NOT NULL, | |
| 139 | - "user_id" bigint DEFAULT '0', | |
| 140 | - "user_type" tinyint DEFAULT '0', | |
| 141 | - "send_status" tinyint NOT NULL DEFAULT '0', | |
| 142 | - "send_time" timestamp DEFAULT NULL, | |
| 143 | - "send_code" int DEFAULT NULL, | |
| 144 | - "send_msg" varchar(255) DEFAULT NULL, | |
| 145 | - "api_send_code" varchar(63) DEFAULT NULL, | |
| 146 | - "api_send_msg" varchar(255) DEFAULT NULL, | |
| 147 | - "api_request_id" varchar(255) DEFAULT NULL, | |
| 148 | - "api_serial_no" varchar(255) DEFAULT NULL, | |
| 149 | - "receive_status" tinyint NOT NULL DEFAULT '0', | |
| 150 | - "receive_time" timestamp DEFAULT NULL, | |
| 151 | - "api_receive_code" varchar(63) DEFAULT NULL, | |
| 152 | - "api_receive_msg" varchar(255) DEFAULT NULL, | |
| 153 | - "creator" varchar(64) DEFAULT '', | |
| 154 | - "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 155 | - "updater" varchar(64) DEFAULT '', | |
| 156 | - "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 157 | - "deleted" bit NOT NULL DEFAULT FALSE, | |
| 158 | - "tenant_id" bigint not null default '0', | |
| 159 | - PRIMARY KEY ("id") | |
| 160 | -) COMMENT '短信日志'; | |
| 161 | - | |
| 162 | -CREATE TABLE IF NOT EXISTS `sys_login_log` ( | |
| 163 | - `id` bigint(20) NOT NULL GENERATED BY DEFAULT AS IDENTITY, | |
| 164 | - `log_type` bigint(4) NOT NULL, | |
| 165 | - "user_id" bigint not null default '0', | |
| 166 | - "user_type" tinyint NOT NULL, | |
| 167 | - `trace_id` varchar(64) NOT NULL DEFAULT '', | |
| 168 | - `username` varchar(50) NOT NULL DEFAULT '', | |
| 169 | - `result` tinyint(4) NOT NULL, | |
| 170 | - `user_ip` varchar(50) NOT NULL, | |
| 171 | - `user_agent` varchar(512) NOT NULL, | |
| 172 | - `creator` varchar(64) DEFAULT '', | |
| 173 | - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 174 | - `updater` varchar(64) DEFAULT '', | |
| 175 | - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
| 176 | - `deleted` bit(1) NOT NULL DEFAULT '0', | |
| 177 | - "tenant_id" bigint not null default '0', | |
| 178 | - PRIMARY KEY (`id`) | |
| 179 | -) COMMENT ='系统访问记录'; | |
| 180 | - | |
| 181 | -CREATE TABLE IF NOT EXISTS "sys_social_user" ( | |
| 182 | - "id" number NOT NULL GENERATED BY DEFAULT AS IDENTITY, | |
| 183 | - "user_id" bigint NOT NULL, | |
| 184 | - "user_type" tinyint NOT NULL DEFAULT '0', | |
| 185 | - "type" tinyint NOT NULL, | |
| 186 | - "openid" varchar(32) NOT NULL, | |
| 187 | - "token" varchar(256) DEFAULT NULL, | |
| 188 | - "union_id" varchar(32) NOT NULL, | |
| 189 | - "raw_token_info" varchar(1024) NOT NULL, | |
| 190 | - "nickname" varchar(32) NOT NULL, | |
| 191 | - "avatar" varchar(255) DEFAULT NULL, | |
| 192 | - "raw_user_info" varchar(1024) NOT NULL, | |
| 193 | - "creator" varchar(64) DEFAULT '', | |
| 194 | - "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 195 | - "updater" varchar(64) DEFAULT '', | |
| 196 | - "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 197 | - "deleted" bit NOT NULL DEFAULT FALSE, | |
| 198 | - PRIMARY KEY ("id") | |
| 199 | -) COMMENT '社交用户'; |
yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobExportReqVO.java
| ... | ... | @@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModel; |
| 4 | 4 | import io.swagger.annotations.ApiModelProperty; |
| 5 | 5 | import lombok.Data; |
| 6 | 6 | |
| 7 | -@ApiModel(value = "管理后台 - 定时任务 Excel 导出 Request VO", description = "参数和 InfJobPageReqVO 是一致的") | |
| 7 | +@ApiModel(value = "管理后台 - 定时任务 Excel 导出 Request VO", description = "参数和 JobPageReqVO 是一致的") | |
| 8 | 8 | @Data |
| 9 | 9 | public class JobExportReqVO { |
| 10 | 10 | ... | ... |
yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobPageReqVO.java
| ... | ... | @@ -16,7 +16,7 @@ public class JobPageReqVO extends PageParam { |
| 16 | 16 | @ApiModelProperty(value = "任务名称", example = "测试任务", notes = "模糊匹配") |
| 17 | 17 | private String name; |
| 18 | 18 | |
| 19 | - @ApiModelProperty(value = "任务状态", example = "1", notes = "参见 InfJobStatusEnum 枚举") | |
| 19 | + @ApiModelProperty(value = "任务状态", example = "1", notes = "参见 JobStatusEnum 枚举") | |
| 20 | 20 | private Integer status; |
| 21 | 21 | |
| 22 | 22 | @ApiModelProperty(value = "处理器的名字", example = "sysUserSessionTimeoutJob", notes = "模糊匹配") | ... | ... |
yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogBaseVO.java
| ... | ... | @@ -43,7 +43,7 @@ public class JobLogBaseVO { |
| 43 | 43 | @ApiModelProperty(value = "执行时长", example = "123") |
| 44 | 44 | private Integer duration; |
| 45 | 45 | |
| 46 | - @ApiModelProperty(value = "任务状态", required = true, example = "1", notes = "参见 InfJobLogStatusEnum 枚举") | |
| 46 | + @ApiModelProperty(value = "任务状态", required = true, example = "1", notes = "参见 JobLogStatusEnum 枚举") | |
| 47 | 47 | @NotNull(message = "任务状态不能为空") |
| 48 | 48 | private Integer status; |
| 49 | 49 | ... | ... |
yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogExportReqVO.java
| ... | ... | @@ -9,7 +9,7 @@ import java.util.Date; |
| 9 | 9 | |
| 10 | 10 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 11 | 11 | |
| 12 | -@ApiModel(value = "管理后台 - 定时任务 Excel 导出 Request VO", description = "参数和 InfJobLogPageReqVO 是一致的") | |
| 12 | +@ApiModel(value = "管理后台 - 定时任务 Excel 导出 Request VO", description = "参数和 JobLogPageReqVO 是一致的") | |
| 13 | 13 | @Data |
| 14 | 14 | public class JobLogExportReqVO { |
| 15 | 15 | |
| ... | ... | @@ -27,7 +27,7 @@ public class JobLogExportReqVO { |
| 27 | 27 | @ApiModelProperty(value = "结束执行时间") |
| 28 | 28 | private Date endTime; |
| 29 | 29 | |
| 30 | - @ApiModelProperty(value = "任务状态", notes = "参见 InfJobLogStatusEnum 枚举") | |
| 30 | + @ApiModelProperty(value = "任务状态", notes = "参见 JobLogStatusEnum 枚举") | |
| 31 | 31 | private Integer status; |
| 32 | 32 | |
| 33 | 33 | } | ... | ... |
yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogPageReqVO.java
| ... | ... | @@ -32,7 +32,7 @@ public class JobLogPageReqVO extends PageParam { |
| 32 | 32 | @ApiModelProperty(value = "结束执行时间") |
| 33 | 33 | private Date endTime; |
| 34 | 34 | |
| 35 | - @ApiModelProperty(value = "任务状态", notes = "参见 InfJobLogStatusEnum 枚举") | |
| 35 | + @ApiModelProperty(value = "任务状态", notes = "参见 JobLogStatusEnum 枚举") | |
| 36 | 36 | private Integer status; |
| 37 | 37 | |
| 38 | 38 | } | ... | ... |
yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogExportReqVO.java
| ... | ... | @@ -9,7 +9,7 @@ import java.util.Date; |
| 9 | 9 | |
| 10 | 10 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 11 | 11 | |
| 12 | -@ApiModel(value = "管理后台 - API 访问日志 Excel 导出 Request VO", description = "参数和 InfApiAccessLogPageReqVO 是一致的") | |
| 12 | +@ApiModel(value = "管理后台 - API 访问日志 Excel 导出 Request VO", description = "参数和 ApiAccessLogPageReqVO 是一致的") | |
| 13 | 13 | @Data |
| 14 | 14 | public class ApiAccessLogExportReqVO { |
| 15 | 15 | ... | ... |
yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogExportReqVO.java
| ... | ... | @@ -9,7 +9,7 @@ import java.util.Date; |
| 9 | 9 | |
| 10 | 10 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 11 | 11 | |
| 12 | -@ApiModel(value = "管理后台 - API 错误日志 Excel 导出 Request VO", description = "参数和 InfApiErrorLogPageReqVO 是一致的") | |
| 12 | +@ApiModel(value = "管理后台 - API 错误日志 Excel 导出 Request VO", description = "参数和 ApiErrorLogPageReqVO 是一致的") | |
| 13 | 13 | @Data |
| 14 | 14 | public class ApiErrorLogExportReqVO { |
| 15 | 15 | ... | ... |
yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/config/ConfigDO.java
| 1 | 1 | package cn.iocoder.yudao.module.infra.dal.dataobject.config; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; |
| 4 | +import cn.iocoder.yudao.module.infra.enums.config.ConfigTypeEnum; | |
| 4 | 5 | import com.baomidou.mybatisplus.annotation.TableField; |
| 5 | 6 | import com.baomidou.mybatisplus.annotation.TableId; |
| 6 | 7 | import com.baomidou.mybatisplus.annotation.TableName; |
| ... | ... | @@ -45,7 +46,7 @@ public class ConfigDO extends BaseDO { |
| 45 | 46 | /** |
| 46 | 47 | * 参数类型 |
| 47 | 48 | * |
| 48 | - * 枚举 {@link InfConfigTypeEnum} | |
| 49 | + * 枚举 {@link ConfigTypeEnum} | |
| 49 | 50 | */ |
| 50 | 51 | @TableField("`type`") |
| 51 | 52 | private Integer type; | ... | ... |
yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/logger/ApiErrorLogDO.java
| ... | ... | @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.infra.dal.dataobject.logger; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; |
| 4 | 4 | import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; |
| 5 | +import cn.iocoder.yudao.module.infra.enums.logger.ApiErrorLogProcessStatusEnum; | |
| 5 | 6 | import com.baomidou.mybatisplus.annotation.TableId; |
| 6 | 7 | import com.baomidou.mybatisplus.annotation.TableName; |
| 7 | 8 | import lombok.*; |
| ... | ... | @@ -136,7 +137,7 @@ public class ApiErrorLogDO extends TenantBaseDO { |
| 136 | 137 | /** |
| 137 | 138 | * 处理状态 |
| 138 | 139 | * |
| 139 | - * 枚举 {@link InfApiErrorLogProcessStatusEnum} | |
| 140 | + * 枚举 {@link ApiErrorLogProcessStatusEnum} | |
| 140 | 141 | */ |
| 141 | 142 | private Integer processStatus; |
| 142 | 143 | /** | ... | ... |
yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/config/ConfigCoreDAOImpl.java renamed to yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/config/ConfigDAOImpl.java
| ... | ... | @@ -12,15 +12,15 @@ import java.util.Date; |
| 12 | 12 | import java.util.List; |
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | - * ConfigFrameworkDAO Core 实现类 | |
| 15 | + * ConfigDAOImpl 实现类 | |
| 16 | 16 | * |
| 17 | 17 | * @author 芋道源码 |
| 18 | 18 | */ |
| 19 | -public class ConfigCoreDAOImpl implements ConfigFrameworkDAO { | |
| 19 | +public class ConfigDAOImpl implements ConfigFrameworkDAO { | |
| 20 | 20 | |
| 21 | 21 | private final JdbcTemplate jdbcTemplate; |
| 22 | 22 | |
| 23 | - public ConfigCoreDAOImpl(String jdbcUrl, String username, String password) { | |
| 23 | + public ConfigDAOImpl(String jdbcUrl, String username, String password) { | |
| 24 | 24 | DataSource dataSource = new DriverManagerDataSource(jdbcUrl, username, password); |
| 25 | 25 | this.jdbcTemplate = new JdbcTemplate(dataSource); |
| 26 | 26 | } | ... | ... |
yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/framework/file/config/FileProperties.java
yudao-module-infra/yudao-module-infra-impl/src/test/resources/application-unit-test.yaml
yudao-module-infra/yudao-module-infra-impl/src/test/resources/sql/clean.sql
yudao-module-infra/yudao-module-infra-impl/src/test/resources/sql/create_tables.sql
| ... | ... | @@ -14,7 +14,7 @@ CREATE TABLE IF NOT EXISTS "infra_config" ( |
| 14 | 14 | "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, |
| 15 | 15 | "deleted" bit NOT NULL DEFAULT FALSE, |
| 16 | 16 | PRIMARY KEY ("id") |
| 17 | - ) COMMENT '参数配置表'; | |
| 17 | +) COMMENT '参数配置表'; | |
| 18 | 18 | |
| 19 | 19 | CREATE TABLE IF NOT EXISTS "infra_file" ( |
| 20 | 20 | "id" varchar(188) NOT NULL, |
| ... | ... | @@ -27,7 +27,7 @@ CREATE TABLE IF NOT EXISTS "infra_file" ( |
| 27 | 27 | "deleted" bit NOT NULL DEFAULT FALSE, |
| 28 | 28 | "tenant_id" bigint not null default '0', |
| 29 | 29 | PRIMARY KEY ("id") |
| 30 | - ) COMMENT '文件表'; | |
| 30 | +) COMMENT '文件表'; | |
| 31 | 31 | |
| 32 | 32 | CREATE TABLE IF NOT EXISTS "infra_job" ( |
| 33 | 33 | "id" bigint(20) NOT NULL GENERATED BY DEFAULT AS IDENTITY COMMENT '任务编号', |
| ... | ... | @@ -45,7 +45,7 @@ CREATE TABLE IF NOT EXISTS "infra_job" ( |
| 45 | 45 | "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 46 | 46 | "deleted" bit NOT NULL DEFAULT FALSE COMMENT '是否删除', |
| 47 | 47 | PRIMARY KEY ("id") |
| 48 | - ) COMMENT='定时任务表'; | |
| 48 | +) COMMENT='定时任务表'; | |
| 49 | 49 | |
| 50 | 50 | CREATE TABLE IF NOT EXISTS "infra_job_log" ( |
| 51 | 51 | "id" bigint(20) NOT NULL GENERATED BY DEFAULT AS IDENTITY COMMENT '日志编号', |
| ... | ... | @@ -64,4 +64,74 @@ CREATE TABLE IF NOT EXISTS "infra_job_log" ( |
| 64 | 64 | "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 65 | 65 | "deleted" bit(1) NOT NULL DEFAULT FALSE COMMENT '是否删除', |
| 66 | 66 | PRIMARY KEY ("id") |
| 67 | - )COMMENT='定时任务日志表'; | |
| 67 | +)COMMENT='定时任务日志表'; | |
| 68 | + | |
| 69 | +CREATE TABLE IF NOT EXISTS "inf_file" ( | |
| 70 | + "id" varchar(188) NOT NULL, | |
| 71 | + "type" varchar(63) DEFAULT NULL, | |
| 72 | + "content" blob NOT NULL, | |
| 73 | + "creator" varchar(64) DEFAULT '', | |
| 74 | + "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 75 | + "updater" varchar(64) DEFAULT '', | |
| 76 | + "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 77 | + "deleted" bit NOT NULL DEFAULT FALSE, | |
| 78 | + "tenant_id" bigint not null default '0', | |
| 79 | + PRIMARY KEY ("id") | |
| 80 | + ) COMMENT '文件表'; | |
| 81 | + | |
| 82 | +CREATE TABLE IF NOT EXISTS "infra_api_access_log" ( | |
| 83 | + "id" bigint not null GENERATED BY DEFAULT AS IDENTITY, | |
| 84 | + "trace_id" varchar(64) not null default '', | |
| 85 | + "user_id" bigint not null default '0', | |
| 86 | + "user_type" tinyint not null default '0', | |
| 87 | + "application_name" varchar(50) not null, | |
| 88 | + "request_method" varchar(16) not null default '', | |
| 89 | + "request_url" varchar(255) not null default '', | |
| 90 | + "request_params" varchar(8000) not null default '', | |
| 91 | + "user_ip" varchar(50) not null, | |
| 92 | + "user_agent" varchar(512) not null, | |
| 93 | + "begin_time" timestamp not null, | |
| 94 | + "end_time" timestamp not null, | |
| 95 | + "duration" integer not null, | |
| 96 | + "result_code" integer not null default '0', | |
| 97 | + "result_msg" varchar(512) default '', | |
| 98 | + "creator" varchar(64) default '', | |
| 99 | + "create_time" timestamp not null default current_timestamp, | |
| 100 | + "updater" varchar(64) default '', | |
| 101 | + "update_time" timestamp not null default current_timestamp, | |
| 102 | + "deleted" bit not null default false, | |
| 103 | + "tenant_id" bigint not null default '0', | |
| 104 | + primary key ("id") | |
| 105 | + ) COMMENT 'API 访问日志表'; | |
| 106 | + | |
| 107 | +CREATE TABLE IF NOT EXISTS "infra_api_error_log" ( | |
| 108 | + "id" integer not null GENERATED BY DEFAULT AS IDENTITY, | |
| 109 | + "trace_id" varchar(64) not null, | |
| 110 | + "user_id" bigint not null default '0', | |
| 111 | + "user_type" tinyint not null default '0', | |
| 112 | + "application_name" varchar(50) not null, | |
| 113 | + "request_method" varchar(16) not null, | |
| 114 | + "request_url" varchar(255) not null, | |
| 115 | + "request_params" varchar(8000) not null, | |
| 116 | + "user_ip" varchar(50) not null, | |
| 117 | + "user_agent" varchar(512) not null, | |
| 118 | + "exception_time" timestamp not null, | |
| 119 | + "exception_name" varchar(128) not null default '', | |
| 120 | + "exception_message" clob not null, | |
| 121 | + "exception_root_cause_message" clob not null, | |
| 122 | + "exception_stack_trace" clob not null, | |
| 123 | + "exception_class_name" varchar(512) not null, | |
| 124 | + "exception_file_name" varchar(512) not null, | |
| 125 | + "exception_method_name" varchar(512) not null, | |
| 126 | + "exception_line_number" integer not null, | |
| 127 | + "process_status" tinyint not null, | |
| 128 | + "process_time" timestamp default null, | |
| 129 | + "process_user_id" bigint default '0', | |
| 130 | + "creator" varchar(64) default '', | |
| 131 | + "create_time" timestamp not null default current_timestamp, | |
| 132 | + "updater" varchar(64) default '', | |
| 133 | + "update_time" timestamp not null default current_timestamp, | |
| 134 | + "deleted" bit not null default false, | |
| 135 | + "tenant_id" bigint not null default '0', | |
| 136 | + primary key ("id") | |
| 137 | +) COMMENT '系统异常日志'; | ... | ... |