Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sh-ds
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
李良停
sh-ds
Commits
6022f8e5
Commit
6022f8e5
authored
May 08, 2022
by
wangsong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add business log
parent
ee6634a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
AuthLogServiceImpl.java
.../eden/authcenter/log/service/impl/AuthLogServiceImpl.java
+4
-0
BusinessLogUtils.java
...chineseall/eden/authcenter/log/util/BusinessLogUtils.java
+8
-0
No files found.
eden-authcenter-log/src/main/java/com/chineseall/eden/authcenter/log/service/impl/AuthLogServiceImpl.java
View file @
6022f8e5
package
com
.
chineseall
.
eden
.
authcenter
.
log
.
service
.
impl
;
import
cn.sh.chineseall.framework.core.util.CollectionUtils
;
import
com.alibaba.fastjson.JSON
;
import
com.chineseall.eden.authcenter.log.dao.AuthLogDao
;
import
com.chineseall.eden.authcenter.log.model.AuthLog
;
import
com.chineseall.eden.authcenter.log.model.AuthLogHourCount
;
import
com.chineseall.eden.authcenter.log.service.AuthLogService
;
import
com.chineseall.eden.authcenter.log.util.BusinessLogUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -26,10 +28,12 @@ public class AuthLogServiceImpl implements AuthLogService {
if
(
authLog
.
getId
()
!=
null
){
authLog
.
setUpdateTime
(
new
Date
());
authLogDao
.
replace
(
authLog
);
BusinessLogUtils
.
info
(
JSON
.
toJSONString
(
authLog
));
}
else
{
authLog
.
setId
(
UUID
.
randomUUID
().
toString
());
authLog
.
setCreateTime
(
new
Date
());
authLogDao
.
insert
(
authLog
);
BusinessLogUtils
.
info
(
JSON
.
toJSONString
(
authLog
));
}
}
...
...
eden-authcenter-log/src/main/java/com/chineseall/eden/authcenter/log/util/BusinessLogUtils.java
View file @
6022f8e5
package
com
.
chineseall
.
eden
.
authcenter
.
log
.
util
;
import
cn.sh.chineseall.framework.core.util.MapUtils
;
import
cn.sh.chineseall.framework.core.util.StringUtils
;
import
com.alibaba.fastjson.JSON
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -17,4 +18,11 @@ public class BusinessLogUtils {
}
logger
.
info
(
JSON
.
toJSONString
(
data
));
}
public
static
void
info
(
String
jsonData
){
if
(
StringUtils
.
isBlank
(
jsonData
)){
return
;
}
logger
.
info
(
jsonData
);
}
}
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