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
8f16b596
Commit
8f16b596
authored
Jan 16, 2025
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录添加埋点
parent
19d686ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
cloud-site-service/src/main/java/com/yizhi/site/application/controller/api/EventTrackController.java
+2
-3
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/EventTrackServiceImpl.java
+2
-5
No files found.
cloud-site-service/src/main/java/com/yizhi/site/application/controller/api/EventTrackController.java
View file @
8f16b596
...
@@ -20,20 +20,19 @@ import java.util.List;
...
@@ -20,20 +20,19 @@ import java.util.List;
* @create 2025-01-14 10:57:55
* @create 2025-01-14 10:57:55
*/
*/
@RestController
@RestController
@RequestMapping
(
"/api/eventTrack"
)
public
class
EventTrackController
{
public
class
EventTrackController
{
@Autowired
@Autowired
private
EventTrackService
eventTrackService
;
private
EventTrackService
eventTrackService
;
@GetMapping
(
"/addEvent"
)
@GetMapping
(
"/a
pi/eventTrack/a
ddEvent"
)
public
void
addEvent
(
@RequestParam
(
"type"
)
String
type
,
@RequestParam
(
"businessId"
)
Long
businessId
){
public
void
addEvent
(
@RequestParam
(
"type"
)
String
type
,
@RequestParam
(
"businessId"
)
Long
businessId
){
eventTrackService
.
addEvent
(
type
,
businessId
);
eventTrackService
.
addEvent
(
type
,
businessId
);
}
}
@GetMapping
(
"/getTodayNum"
)
@GetMapping
(
"/
api/eventTrack/
getTodayNum"
)
public
EventTrackDayNumVo
getTodayNum
(
@RequestParam
(
value
=
"date"
,
required
=
false
)
String
date
){
public
EventTrackDayNumVo
getTodayNum
(
@RequestParam
(
value
=
"date"
,
required
=
false
)
String
date
){
return
eventTrackService
.
getTodayNum
(
date
);
return
eventTrackService
.
getTodayNum
(
date
);
}
}
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/EventTrackServiceImpl.java
View file @
8f16b596
...
@@ -67,17 +67,14 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
...
@@ -67,17 +67,14 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
eventTrack
.
setDeptName
(
authzUserGroupVo
.
getName
());
eventTrack
.
setDeptName
(
authzUserGroupVo
.
getName
());
}
}
String
key
=
"event_track_type"
;
String
key
=
"event_track_type"
;
Response
<
List
<
Dictionary
>>
response
=
dictionaryFeignClients
.
listChildDictionary
(
key
,
false
,
1
);
List
<
Dictionary
>
dictionaryList
=
dictionaryFeignClients
.
listChildDictionary
(
key
,
false
,
1
);
if
(
response
!=
null
&&
response
.
getData
()!=
null
){
if
(
CollUtil
.
isNotEmpty
(
dictionaryList
)){
List
<
Dictionary
>
dictionaryList
=
(
List
<
Dictionary
>)
response
.
getData
();
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
(),
key
+
"_"
+
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
());
eventTrack
.
setType
(
Integer
.
valueOf
(
dictionary
.
getDescription
()));
eventTrack
.
setType
(
Integer
.
valueOf
(
dictionary
.
getDescription
()));
}
}
}
}
}
eventTrack
.
setId
(
idGenerator
.
generate
());
eventTrack
.
setId
(
idGenerator
.
generate
());
this
.
insert
(
eventTrack
);
this
.
insert
(
eventTrack
);
...
...
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