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
5963a198
Commit
5963a198
authored
Sep 05, 2025
by
“Kongxiangkun”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
评论,收藏,点赞 埋点面板修改
parent
f6164744
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
46 deletions
+47
-46
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/EventTrackServiceImpl.java
+47
-46
No files found.
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/EventTrackServiceImpl.java
View file @
5963a198
...
@@ -399,63 +399,64 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
...
@@ -399,63 +399,64 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
return
null
;
return
null
;
}
}
private
List
<
EventTrackTypeNumVo
>
queryNumByType
(
String
date
,
Boolean
isPre
,
List
<
Integer
>
types
,
String
sub
Name
)
{
private
List
<
EventTrackTypeNumVo
>
queryNumByType
(
String
date
,
Boolean
isPre
,
List
<
Integer
>
types
,
String
sub
Ids
)
{
logger
.
info
(
"埋点统计行为统计入参date:{},isPre:{}, types:{}, subName:{}"
,
date
,
isPre
,
types
,
sub
Name
);
logger
.
info
(
"埋点统计行为统计入参date:{},isPre:{}, types:{}, subName:{}"
,
date
,
isPre
,
types
,
sub
Ids
);
if
(
ObjectUtils
.
isEmpty
(
date
)){
if
(
ObjectUtils
.
isEmpty
(
date
)){
date
=
"3"
;
date
=
"3"
;
}
}
String
dateString
=
getDateString
(
date
);
String
dateString
=
getDateString
(
date
);
Long
id
=
null
;
Long
id
=
null
;
RequestContext
context
=
ContextHolder
.
get
();
RequestContext
context
=
ContextHolder
.
get
();
if
(!
ObjectUtils
.
isEmpty
(
subName
))
{
//
if(!ObjectUtils.isEmpty(subName)) {
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
.
getValue
(),
"6"
)&&
Objects
.
equals
(
d
.
getCnName
(),
subName
)).
findFirst
();
//
Optional<Dictionary> optional = dictionaryList.stream().filter(d -> Objects.equals(d.getValue(), "6")&&Objects.equals(d.getCnName(), subName)).findFirst();
if
(
optional
!=
null
&&
optional
.
isPresent
())
{
//
if (optional != null && optional.isPresent()) {
Dictionary
dictionary
=
optional
.
get
();
//
Dictionary dictionary = optional.get();
id
=
Long
.
valueOf
(
dictionary
.
getCode
());
//
id = Long.valueOf(dictionary.getCode());
}
//
}
}
//
}
}
//
}
List
<
String
>
subNameList
=
null
;
List
<
String
>
subNameList
=
null
;
List
<
DataClassification
>
classificationList
=
null
;
//
List<DataClassification> classificationList = null;
if
(
id
!=
null
)
{
//
if(id!=null) {
classificationList
=
dataClassificationService
.
getSon
(
id
);
//
classificationList = dataClassificationService.getSon(id);
if
(
CollectionUtil
.
isNotEmpty
(
classificationList
)){
//
if(CollectionUtil.isNotEmpty(classificationList)){
subNameList
=
classificationList
.
stream
().
map
(
DataClassification:
:
getName
).
collect
(
Collectors
.
toList
());
//
subNameList = classificationList.stream().map(DataClassification::getName).collect(Collectors.toList());
}
//
}
}
//
}
List
<
EventTrackTypeNumVo
>
eventTrackTypeNumVoList
=
null
;
List
<
EventTrackTypeNumVo
>
eventTrackTypeNumVoList
=
null
;
List
<
String
>
subIdList
=
Arrays
.
asList
(
subIds
.
split
(
","
));
//判断是否获取阅读量
//判断是否获取阅读量
if
(
types
.
get
(
0
).
equals
(
6
)){
//
if(types.get(0).equals(6)){
//阅读量
//阅读量
List
<
String
>
subIdList
=
Lists
.
newArrayList
();
//
List<String> subIdList = Lists.newArrayList();
for
(
DataClassification
item
:
classificationList
){
//
for(DataClassification item : classificationList){
subIdList
.
add
(
item
.
getId
().
toString
());
//
subIdList.add(item.getId().toString());
}
//
}
eventTrackTypeNumVoList
=
this
.
baseMapper
.
queryNumByTypeInformation
(
null
,
date
,
dateString
,
types
,
subIdList
,
context
.
getSiteId
(),
isPre
);
//
eventTrackTypeNumVoList = this.baseMapper.queryNumByTypeInformation(null,date,dateString,types,subIdList,context.getSiteId(), isPre);
}
else
{
//
} else {
logger
.
info
(
"埋点统计行为统计入参date:{},isPre:{}, types:{}, subName:{}, siteId:{}, sub
NameList:{}"
,
date
,
isPre
,
types
,
subName
,
context
.
getSiteId
(),
subName
List
);
logger
.
info
(
"埋点统计行为统计入参date:{},isPre:{}, types:{}, subName:{}, siteId:{}, sub
IdList:{}"
,
date
,
isPre
,
types
,
subIdList
,
context
.
getSiteId
(),
subId
List
);
eventTrackTypeNumVoList
=
this
.
baseMapper
.
queryNumByType
(
null
,
date
,
dateString
,
types
,
sub
Name
List
,
context
.
getSiteId
(),
isPre
);
eventTrackTypeNumVoList
=
this
.
baseMapper
.
queryNumByType
(
null
,
date
,
dateString
,
types
,
sub
Id
List
,
context
.
getSiteId
(),
isPre
);
logger
.
info
(
"埋点统计行为统计查询结果:{}"
,
JSONUtil
.
toJsonStr
(
eventTrackTypeNumVoList
));
logger
.
info
(
"埋点统计行为统计查询结果:{}"
,
JSONUtil
.
toJsonStr
(
eventTrackTypeNumVoList
));
}
//
}
if
(
CollectionUtil
.
isNotEmpty
(
subNameList
)){
//
if(CollectionUtil.isNotEmpty(subNameList)){
List
<
EventTrackTypeNumVo
>
finalEventTrackTypeNumVoList
=
eventTrackTypeNumVoList
;
//
List<EventTrackTypeNumVo> finalEventTrackTypeNumVoList = eventTrackTypeNumVoList;
subNameList
.
stream
().
forEach
(
name
->{
//
subNameList.stream().forEach(name->{
EventTrackTypeNumVo
eventTrackTypeNumVo
=
new
EventTrackTypeNumVo
();
//
EventTrackTypeNumVo eventTrackTypeNumVo = new EventTrackTypeNumVo();
eventTrackTypeNumVo
.
setNum
(
0
);
//
eventTrackTypeNumVo.setNum(0);
eventTrackTypeNumVo
.
setSubType
(
name
);
//
eventTrackTypeNumVo.setSubType(name);
if
(
CollectionUtil
.
isNotEmpty
(
finalEventTrackTypeNumVoList
)){
//
if(CollectionUtil.isNotEmpty(finalEventTrackTypeNumVoList)){
Optional
optional
=
finalEventTrackTypeNumVoList
.
stream
().
filter
(
e
->
Objects
.
equals
(
e
.
getSubType
(),
name
)).
findFirst
();
//
Optional optional = finalEventTrackTypeNumVoList.stream().filter(e->Objects.equals(e.getSubType(),name)).findFirst();
if
(
optional
==
null
||!
optional
.
isPresent
()){
//
if(optional==null||!optional.isPresent()){
finalEventTrackTypeNumVoList
.
add
(
eventTrackTypeNumVo
);
//
finalEventTrackTypeNumVoList.add(eventTrackTypeNumVo);
}
//
}
}
else
{
//
}else{
finalEventTrackTypeNumVoList
.
add
(
eventTrackTypeNumVo
);
//
finalEventTrackTypeNumVoList.add(eventTrackTypeNumVo);
}
//
}
});
//
});
}
//
}
return
eventTrackTypeNumVoList
;
return
eventTrackTypeNumVoList
;
}
}
...
...
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