Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
xyqb-user2
Commits
29022760
Commit
29022760
authored
Jun 28, 2023
by
王亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
format Localdatetime
parent
7aae1762
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
update-20230621.sql
doc/sql/update-20230621.sql
+2
-2
LogCallHttpAspect.java
...n/quantgroup/xyqb/aspect/logcaller/LogCallHttpAspect.java
+2
-1
No files found.
doc/sql/update-20230621.sql
View file @
29022760
...
@@ -13,8 +13,8 @@ CREATE TABLE `xyqb_user`.`user_info` (
...
@@ -13,8 +13,8 @@ CREATE TABLE `xyqb_user`.`user_info` (
`city_id`
INT
NULL
COMMENT
'地址市id'
,
`city_id`
INT
NULL
COMMENT
'地址市id'
,
`address`
VARCHAR
(
255
)
NULL
COMMENT
'详细地址'
,
`address`
VARCHAR
(
255
)
NULL
COMMENT
'详细地址'
,
`tenant_id`
INT
NOT
NULL
COMMENT
'租户id'
,
`tenant_id`
INT
NOT
NULL
COMMENT
'租户id'
,
`created_at`
TIMESTAMP
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`created_at`
TIMESTAMP
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`updated_at`
TIMESTAMP
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`updated_at`
TIMESTAMP
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
),
PRIMARY
KEY
(
`id`
),
INDEX
`idx_user_id`
(
`user_id`
ASC
),
INDEX
`idx_user_id`
(
`user_id`
ASC
),
INDEX
`idx_user_phone`
(
`phone_no`
ASC
)
INDEX
`idx_user_phone`
(
`phone_no`
ASC
)
...
...
src/main/java/cn/quantgroup/xyqb/aspect/logcaller/LogCallHttpAspect.java
View file @
29022760
package
cn
.
quantgroup
.
xyqb
.
aspect
.
logcaller
;
package
cn
.
quantgroup
.
xyqb
.
aspect
.
logcaller
;
import
cn.quantgroup.xyqb.util.IpUtil
;
import
cn.quantgroup.xyqb.util.IpUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.google.common.base.Stopwatch
;
import
com.google.common.base.Stopwatch
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -57,7 +58,7 @@ public class LogCallHttpAspect {
...
@@ -57,7 +58,7 @@ public class LogCallHttpAspect {
String
resultStr
=
result
==
null
?
""
:
objectMapper
.
writeValueAsString
(
result
);
String
resultStr
=
result
==
null
?
""
:
objectMapper
.
writeValueAsString
(
result
);
resultStr
=
resultStr
.
length
()
<
500
?
resultStr
:
resultStr
.
substring
(
0
,
500
);
resultStr
=
resultStr
.
length
()
<
500
?
resultStr
:
resultStr
.
substring
(
0
,
500
);
log
.
info
(
"[httpRequestLog],url:[{}],duration:[{}],[耗时区间]{},remoteIP:[{}],args:[{}],exception:[{}],result:[{}]"
,
log
.
info
(
"[httpRequestLog],url:[{}],duration:[{}],[耗时区间]{},remoteIP:[{}],args:[{}],exception:[{}],result:[{}]"
,
request
.
getRequestURL
(),
elapsed
,
slowlyTag
(
elapsed
),
remoteIP
,
args
,
hasException
,
resultStr
);
request
.
getRequestURL
(),
elapsed
,
slowlyTag
(
elapsed
),
remoteIP
,
JSON
.
toJSONString
(
args
)
,
hasException
,
resultStr
);
}
}
return
result
;
return
result
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment