Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
site-project
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
site-project
Commits
eba1295c
Commit
eba1295c
authored
Jan 16, 2025
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
咨询查询所有
parent
8f16b596
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/EventTrackServiceImpl.java
+9
-4
No files found.
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/EventTrackServiceImpl.java
View file @
eba1295c
...
@@ -52,16 +52,21 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
...
@@ -52,16 +52,21 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
public
void
addEvent
(
String
type
,
Long
businessId
){
public
void
addEvent
(
String
type
,
Long
businessId
){
logger
.
info
(
"新增埋点{},{}"
,
type
,
businessId
);
logger
.
info
(
"新增埋点{},{}"
,
type
,
businessId
);
RequestContext
context
=
ContextHolder
.
get
();
RequestContext
context
=
ContextHolder
.
get
();
Long
userId
=
context
.
getAccountId
();
if
(
Objects
.
equals
(
type
,
"event_login"
)){
userId
=
businessId
;
ContextHolder
.
get
().
setAccountId
(
userId
);
}
EventTrack
eventTrack
=
new
EventTrack
();
EventTrack
eventTrack
=
new
EventTrack
();
Date
toDay
=
new
Date
();
Date
toDay
=
new
Date
();
eventTrack
.
setBusinessId
(
businessId
);
eventTrack
.
setBusinessId
(
businessId
);
eventTrack
.
setCreateById
(
context
.
getAccountId
()
);
eventTrack
.
setCreateById
(
userId
);
eventTrack
.
setCreateByName
(
context
.
getAccountName
());
eventTrack
.
setCreateByName
(
context
.
getAccountName
());
eventTrack
.
setCreateTime
(
toDay
);
eventTrack
.
setCreateTime
(
toDay
);
eventTrack
.
setUpdateById
(
context
.
getAccountId
()
);
eventTrack
.
setUpdateById
(
userId
);
eventTrack
.
setUpdateByName
(
context
.
getAccountName
());
eventTrack
.
setUpdateByName
(
context
.
getAccountName
());
eventTrack
.
setUpdateTime
(
toDay
);
eventTrack
.
setUpdateTime
(
toDay
);
AuthzUserGroupVo
authzUserGroupVo
=
leaveWordClient
.
getAuthzUserGroup
();
AuthzUserGroupVo
authzUserGroupVo
=
leaveWordClient
.
getAuthzUserGroup
(
userId
);
if
(
authzUserGroupVo
!=
null
){
if
(
authzUserGroupVo
!=
null
){
eventTrack
.
setDeptId
(
authzUserGroupVo
.
getId
());
eventTrack
.
setDeptId
(
authzUserGroupVo
.
getId
());
eventTrack
.
setDeptName
(
authzUserGroupVo
.
getName
());
eventTrack
.
setDeptName
(
authzUserGroupVo
.
getName
());
...
@@ -69,7 +74,7 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
...
@@ -69,7 +74,7 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
String
key
=
"event_track_type"
;
String
key
=
"event_track_type"
;
List
<
Dictionary
>
dictionaryList
=
dictionaryFeignClients
.
listChildDictionary
(
key
,
false
,
1
);
List
<
Dictionary
>
dictionaryList
=
dictionaryFeignClients
.
listChildDictionary
(
key
,
false
,
1
);
if
(
CollUtil
.
isNotEmpty
(
dictionaryList
)){
if
(
CollUtil
.
isNotEmpty
(
dictionaryList
)){
Optional
<
Dictionary
>
optional
=
dictionaryList
.
stream
().
filter
(
d
->
Objects
.
equals
(
d
.
getCode
(),
key
+
"_"
+
type
)).
findFirst
();
Optional
<
Dictionary
>
optional
=
dictionaryList
.
stream
().
filter
(
d
->
Objects
.
equals
(
d
.
getCode
(),
type
)).
findFirst
();
if
(
optional
!=
null
&&
optional
.
isPresent
()){
if
(
optional
!=
null
&&
optional
.
isPresent
()){
Dictionary
dictionary
=
optional
.
get
();
Dictionary
dictionary
=
optional
.
get
();
eventTrack
.
setSubType
(
dictionary
.
getCnName
());
eventTrack
.
setSubType
(
dictionary
.
getCnName
());
...
...
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