fix 修复 字段长度超出数据库限制问题
This commit is contained in:
parent
e78684886d
commit
1aff46bc1c
@ -100,7 +100,7 @@ public class LogAspect {
|
|||||||
|
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
operLog.setStatus(BusinessStatus.FAIL.ordinal());
|
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();
|
String className = joinPoint.getTarget().getClass().getName();
|
||||||
@ -146,7 +146,7 @@ public class LogAspect {
|
|||||||
}
|
}
|
||||||
// 是否需要保存response,参数和值
|
// 是否需要保存response,参数和值
|
||||||
if (log.isSaveResponseData() && ObjectUtil.isNotNull(jsonResult)) {
|
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();
|
String requestMethod = operLog.getRequestMethod();
|
||||||
if (MapUtil.isEmpty(paramsMap) && StringUtils.equalsAny(requestMethod, HttpMethod.PUT.name(), HttpMethod.POST.name(), HttpMethod.DELETE.name())) {
|
if (MapUtil.isEmpty(paramsMap) && StringUtils.equalsAny(requestMethod, HttpMethod.PUT.name(), HttpMethod.POST.name(), HttpMethod.DELETE.name())) {
|
||||||
String params = argsArrayToString(joinPoint.getArgs(), excludeParamNames);
|
String params = argsArrayToString(joinPoint.getArgs(), excludeParamNames);
|
||||||
operLog.setOperParam(StringUtils.substring(params, 0, 5000));
|
operLog.setOperParam(StringUtils.substring(params, 0, 3800));
|
||||||
} else {
|
} else {
|
||||||
MapUtil.removeAny(paramsMap, EXCLUDE_PROPERTIES);
|
MapUtil.removeAny(paramsMap, EXCLUDE_PROPERTIES);
|
||||||
MapUtil.removeAny(paramsMap, excludeParamNames);
|
MapUtil.removeAny(paramsMap, excludeParamNames);
|
||||||
operLog.setOperParam(StringUtils.substring(JsonUtils.toJsonString(paramsMap), 0, 5000));
|
operLog.setOperParam(StringUtils.substring(JsonUtils.toJsonString(paramsMap), 0, 3800));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -738,10 +738,10 @@ create table sys_oper_log (
|
|||||||
oper_url varchar2(255) default '',
|
oper_url varchar2(255) default '',
|
||||||
oper_ip varchar2(128) default '',
|
oper_ip varchar2(128) default '',
|
||||||
oper_location varchar2(255) default '',
|
oper_location varchar2(255) default '',
|
||||||
oper_param varchar2(5500) default '',
|
oper_param varchar2(4000) default '',
|
||||||
json_result varchar2(5500) default '',
|
json_result varchar2(4000) default '',
|
||||||
status number(1) default 0,
|
status number(1) default 0,
|
||||||
error_msg varchar2(5500) default '',
|
error_msg varchar2(4000) default '',
|
||||||
oper_time date,
|
oper_time date,
|
||||||
cost_time number(20) default 0
|
cost_time number(20) default 0
|
||||||
);
|
);
|
||||||
|
@ -741,10 +741,10 @@ create table if not exists sys_oper_log
|
|||||||
oper_url varchar(255) default ''::varchar,
|
oper_url varchar(255) default ''::varchar,
|
||||||
oper_ip varchar(128) default ''::varchar,
|
oper_ip varchar(128) default ''::varchar,
|
||||||
oper_location varchar(255) default ''::varchar,
|
oper_location varchar(255) default ''::varchar,
|
||||||
oper_param varchar(5000) default ''::varchar,
|
oper_param varchar(4000) default ''::varchar,
|
||||||
json_result varchar(5000) default ''::varchar,
|
json_result varchar(4000) default ''::varchar,
|
||||||
status int4 default 0,
|
status int4 default 0,
|
||||||
error_msg varchar(5000) default ''::varchar,
|
error_msg varchar(4000) default ''::varchar,
|
||||||
oper_time timestamp,
|
oper_time timestamp,
|
||||||
cost_time int8 default 0,
|
cost_time int8 default 0,
|
||||||
constraint sys_oper_log_pk primary key (oper_id)
|
constraint sys_oper_log_pk primary key (oper_id)
|
||||||
@ -1209,7 +1209,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 (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 (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 (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);
|
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);
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
@ -554,10 +554,10 @@ create table sys_oper_log (
|
|||||||
oper_url varchar(255) default '' comment '请求URL',
|
oper_url varchar(255) default '' comment '请求URL',
|
||||||
oper_ip varchar(128) default '' comment '主机地址',
|
oper_ip varchar(128) default '' comment '主机地址',
|
||||||
oper_location varchar(255) default '' comment '操作地点',
|
oper_location varchar(255) default '' comment '操作地点',
|
||||||
oper_param varchar(5000) default '' comment '请求参数',
|
oper_param varchar(4000) default '' comment '请求参数',
|
||||||
json_result varchar(5000) default '' comment '返回参数',
|
json_result varchar(4000) default '' comment '返回参数',
|
||||||
status int(1) default 0 comment '操作状态(0正常 1异常)',
|
status int(1) default 0 comment '操作状态(0正常 1异常)',
|
||||||
error_msg varchar(5000) default '' comment '错误消息',
|
error_msg varchar(4000) default '' comment '错误消息',
|
||||||
oper_time datetime comment '操作时间',
|
oper_time datetime comment '操作时间',
|
||||||
cost_time bigint(20) default 0 comment '消耗时间',
|
cost_time bigint(20) default 0 comment '消耗时间',
|
||||||
primary key (oper_id),
|
primary key (oper_id),
|
||||||
@ -840,7 +840,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 (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 (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 (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);
|
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);
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
@ -2002,10 +2002,10 @@ CREATE TABLE sys_oper_log
|
|||||||
oper_url nvarchar(255) DEFAULT '' NULL,
|
oper_url nvarchar(255) DEFAULT '' NULL,
|
||||||
oper_ip nvarchar(128) DEFAULT '' NULL,
|
oper_ip nvarchar(128) DEFAULT '' NULL,
|
||||||
oper_location nvarchar(255) DEFAULT '' NULL,
|
oper_location nvarchar(255) DEFAULT '' NULL,
|
||||||
oper_param nvarchar(5000) DEFAULT '' NULL,
|
oper_param nvarchar(4000) DEFAULT '' NULL,
|
||||||
json_result nvarchar(5000) DEFAULT '' NULL,
|
json_result nvarchar(4000) DEFAULT '' NULL,
|
||||||
status int DEFAULT ((0)) NULL,
|
status int DEFAULT ((0)) NULL,
|
||||||
error_msg nvarchar(5000) DEFAULT '' NULL,
|
error_msg nvarchar(4000) DEFAULT '' NULL,
|
||||||
oper_time datetime2(7) NULL,
|
oper_time datetime2(7) NULL,
|
||||||
cost_time bigint DEFAULT ((0)) NULL,
|
cost_time bigint DEFAULT ((0)) NULL,
|
||||||
CONSTRAINT PK__sys_oper__34723BF9BD954573 PRIMARY KEY CLUSTERED (oper_id)
|
CONSTRAINT PK__sys_oper__34723BF9BD954573 PRIMARY KEY CLUSTERED (oper_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user