From 1152429d9a77ed0996b7c19df7471b65cbcb1dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 26 Nov 2024 15:40:10 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E9=95=BF=E5=BA=A6=E8=B6=85=E5=87=BA=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E9=99=90=E5=88=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/dromara/common/log/aspect/LogAspect.java | 8 ++++---- sql/oracle/oracle_ry_cloud.sql | 6 +++--- sql/postgres/postgres_ry_cloud.sql | 8 ++++---- sql/ry-cloud.sql | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/org/dromara/common/log/aspect/LogAspect.java b/ruoyi-common/ruoyi-common-log/src/main/java/org/dromara/common/log/aspect/LogAspect.java index 431c9fe27..8aeb5a8a8 100644 --- a/ruoyi-common/ruoyi-common-log/src/main/java/org/dromara/common/log/aspect/LogAspect.java +++ b/ruoyi-common/ruoyi-common-log/src/main/java/org/dromara/common/log/aspect/LogAspect.java @@ -100,7 +100,7 @@ public class LogAspect { if (e != null) { operLog.setStatus(BusinessStatus.FAIL.ordinal()); - operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 5000)); + operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 3800)); } // 设置方法名称 String className = joinPoint.getTarget().getClass().getName(); @@ -146,7 +146,7 @@ public class LogAspect { } // 是否需要保存response,参数和值 if (log.isSaveResponseData() && ObjectUtil.isNotNull(jsonResult)) { - operLog.setJsonResult(StringUtils.substring(JsonUtils.toJsonString(jsonResult), 0, 5000)); + operLog.setJsonResult(StringUtils.substring(JsonUtils.toJsonString(jsonResult), 0, 3800)); } } @@ -161,11 +161,11 @@ public class LogAspect { String requestMethod = operLog.getRequestMethod(); if (MapUtil.isEmpty(paramsMap) && StringUtils.equalsAny(requestMethod, HttpMethod.PUT.name(), HttpMethod.POST.name(), HttpMethod.DELETE.name())) { String params = argsArrayToString(joinPoint.getArgs(), excludeParamNames); - operLog.setOperParam(StringUtils.substring(params, 0, 5000)); + operLog.setOperParam(StringUtils.substring(params, 0, 3800)); } else { MapUtil.removeAny(paramsMap, EXCLUDE_PROPERTIES); MapUtil.removeAny(paramsMap, excludeParamNames); - operLog.setOperParam(StringUtils.substring(JsonUtils.toJsonString(paramsMap), 0, 5000)); + operLog.setOperParam(StringUtils.substring(JsonUtils.toJsonString(paramsMap), 0, 3800)); } } diff --git a/sql/oracle/oracle_ry_cloud.sql b/sql/oracle/oracle_ry_cloud.sql index d0f9b302f..a36c03cef 100644 --- a/sql/oracle/oracle_ry_cloud.sql +++ b/sql/oracle/oracle_ry_cloud.sql @@ -774,10 +774,10 @@ create table sys_oper_log ( oper_url varchar2(255) default '', oper_ip varchar2(128) default '', oper_location varchar2(255) default '', - oper_param varchar2(5500) default '', - json_result varchar2(5500) default '', + oper_param varchar2(4000) default '', + json_result varchar2(4000) default '', status number(1) default 0, - error_msg varchar2(5500) default '', + error_msg varchar2(4000) default '', oper_time date, cost_time number(20) default 0 ); diff --git a/sql/postgres/postgres_ry_cloud.sql b/sql/postgres/postgres_ry_cloud.sql index 72d5bf978..879abd387 100644 --- a/sql/postgres/postgres_ry_cloud.sql +++ b/sql/postgres/postgres_ry_cloud.sql @@ -774,10 +774,10 @@ create table if not exists sys_oper_log oper_url varchar(255) default ''::varchar, oper_ip varchar(128) default ''::varchar, oper_location varchar(255) default ''::varchar, - oper_param varchar(5000) default ''::varchar, - json_result varchar(5000) default ''::varchar, + oper_param varchar(4000) default ''::varchar, + json_result varchar(4000) default ''::varchar, status int4 default 0, - error_msg varchar(5000) default ''::varchar, + error_msg varchar(4000) default ''::varchar, oper_time timestamp, cost_time int8 default 0, constraint sys_oper_log_pk primary key (oper_id) @@ -1254,7 +1254,7 @@ comment on column sys_oss_config.remark is '备注'; insert into sys_oss_config values (1, '000000', 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1', '0', '', 103, 1, now(), 1, now(), null); insert into sys_oss_config values (2, '000000', 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1', '1', '', 103, 1, now(), 1, now(), null); insert into sys_oss_config values (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1', '1', '', 103, 1, now(), 1, now(), null); -insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1', '1', '', 103, 1, now(), 1, now(), null); +insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1240000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1', '1', '', 103, 1, now(), 1, now(), null); insert into sys_oss_config values (5, '000000', 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1', '1', '', 103, 1, now(), 1, now(), NULL); diff --git a/sql/ry-cloud.sql b/sql/ry-cloud.sql index 46e978d35..124185e0b 100644 --- a/sql/ry-cloud.sql +++ b/sql/ry-cloud.sql @@ -588,10 +588,10 @@ create table sys_oper_log ( oper_url varchar(255) default '' comment '请求URL', oper_ip varchar(128) default '' comment '主机地址', oper_location varchar(255) default '' comment '操作地点', - oper_param varchar(5000) default '' comment '请求参数', - json_result varchar(5000) default '' comment '返回参数', + oper_param varchar(4000) default '' comment '请求参数', + json_result varchar(4000) default '' comment '返回参数', status int(1) default 0 comment '操作状态(0正常 1异常)', - error_msg varchar(5000) default '' comment '错误消息', + error_msg varchar(4000) default '' comment '错误消息', oper_time datetime comment '操作时间', cost_time bigint(20) default 0 comment '消耗时间', primary key (oper_id), @@ -884,7 +884,7 @@ create table sys_oss_config ( insert into sys_oss_config values (1, '000000', 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1' ,'0', '', 103, 1, sysdate(), 1, sysdate(), NULL); insert into sys_oss_config values (2, '000000', 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL); insert into sys_oss_config values (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL); -insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL); +insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1240000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL); insert into sys_oss_config values (5, '000000', 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);