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
9a1b10bb
Commit
9a1b10bb
authored
Feb 18, 2025
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文件上传
parent
16b84f4b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
2 deletions
+52
-2
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/EventTrackMapper.java
+2
-0
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/EventTrackServiceImpl.java
+43
-2
cloud-site-service/src/main/resources/mapper/EventTrackMapper.xml
+7
-0
No files found.
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/EventTrackMapper.java
View file @
9a1b10bb
...
...
@@ -28,4 +28,6 @@ public interface EventTrackMapper extends BaseMapper<EventTrack> {
List
<
EventTrackDeptNumVo
>
queryDeptByType
(
@Param
(
"date"
)
String
date
,
@Param
(
"dateString"
)
String
dateString
,
@Param
(
"types"
)
List
<
Integer
>
types
);
Integer
getNum
(
@Param
(
"type"
)
Integer
type
,
@Param
(
"businessId"
)
Long
businessId
);
List
<
EventTrackDeptNumVo
>
queryGropByList
();
}
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/EventTrackServiceImpl.java
View file @
9a1b10bb
...
...
@@ -197,11 +197,52 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
}
String
dateString
=
getDateString
(
date
);
List
<
EventTrackDeptNumVo
>
eventTrackDeptNumVoList
=
this
.
baseMapper
.
query
DeptByType
(
date
,
dateString
,
types
);
List
<
EventTrackDeptNumVo
>
eventTrackDeptNumVoList
=
this
.
baseMapper
.
query
GropByList
(
);
if
(
CollUtil
.
isNotEmpty
(
eventTrackDeptNumVoList
)){
String
finalDate
=
date
;
eventTrackDeptNumVoList
.
stream
().
forEach
(
eventTrackDeptNumVo
->
{
eventTrackDeptNumVo
.
setEventTrackTypeNumVoList
(
this
.
baseMapper
.
queryNumByType
(
eventTrackDeptNumVo
.
getDeptId
(),
finalDate
,
dateString
,
types
,
null
));
List
<
EventTrackTypeNumVo
>
eventTrackTypeNumVoList
=
this
.
baseMapper
.
queryNumByType
(
eventTrackDeptNumVo
.
getDeptId
(),
finalDate
,
dateString
,
types
,
null
);
if
(
CollectionUtil
.
isNotEmpty
(
eventTrackTypeNumVoList
)){
List
<
EventTrackTypeNumVo
>
voList
=
Lists
.
newArrayList
();
eventTrackTypeNumVoList
.
stream
().
forEach
(
numVo
->{
Optional
<
EventTrackTypeNumVo
>
optional
=
voList
.
stream
().
filter
(
v
->
Objects
.
equals
(
v
.
getType
(),
numVo
.
getType
())).
findFirst
();
if
(
optional
!=
null
&&
optional
.
isPresent
()){
EventTrackTypeNumVo
vo
=
optional
.
get
();
if
(
numVo
.
getNum
()!=
null
)
{
if
(
vo
.
getNum
()!=
null
)
{
vo
.
setNum
(
numVo
.
getNum
()+
vo
.
getNum
());
}
else
{
vo
.
setNum
(
numVo
.
getNum
());
}
}
}
else
{
if
(
numVo
.
getType
()==
13
){
numVo
.
setSubType
(
"评论总书"
);
}
voList
.
add
(
numVo
);
}
});
eventTrackDeptNumVo
.
setEventTrackTypeNumVoList
(
voList
);
}
else
{
eventTrackDeptNumVo
.
setEventTrackTypeNumVoList
(
eventTrackTypeNumVoList
);
}
types
.
stream
().
forEach
(
t
->{
EventTrackTypeNumVo
vo
=
new
EventTrackTypeNumVo
();
vo
.
setType
(
t
);
vo
.
setNum
(
0
);
if
(
CollectionUtil
.
isNotEmpty
(
eventTrackDeptNumVo
.
getEventTrackTypeNumVoList
()))
{
Optional
<
EventTrackTypeNumVo
>
optional
=
eventTrackDeptNumVo
.
getEventTrackTypeNumVoList
().
stream
().
filter
(
v
->
Objects
.
equals
(
v
.
getType
(),
t
)).
findFirst
();
if
(!(
optional
!=
null
&&
optional
.
isPresent
())){
eventTrackDeptNumVo
.
getEventTrackTypeNumVoList
().
add
(
vo
);
}
}
else
{
List
<
EventTrackTypeNumVo
>
voList
=
Lists
.
newArrayList
();
voList
.
add
(
vo
);
eventTrackDeptNumVo
.
setEventTrackTypeNumVoList
(
voList
);
}
});
});
}
return
eventTrackDeptNumVoList
;
...
...
cloud-site-service/src/main/resources/mapper/EventTrackMapper.xml
View file @
9a1b10bb
...
...
@@ -117,4 +117,10 @@
select count(1) from event_track e where e.deleted =0
and e.type=#{type} and e.business_id = #{businessId}
</select>
<select
id=
"queryGropByList"
resultType=
"com.yizhi.site.application.vo.site.EventTrackDeptNumVo"
>
SELECT aug.id as deptId,
aug.name as deptName,
0 as num
FROM cloud_system.authz_user_group aug
</select>
</mapper>
\ No newline at end of file
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