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
ec599564
Commit
ec599564
authored
Sep 17, 2025
by
“Kongxiangkun”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
投票增加分页,工作台面板优化
parent
4b4f0357
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
29 deletions
+17
-29
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/EventTrackMapper.java
+2
-2
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/EventTrackServiceImpl.java
+2
-2
cloud-site-service/src/main/resources/mapper/EventTrackMapper.xml
+13
-25
No files found.
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/EventTrackMapper.java
View file @
ec599564
...
@@ -28,14 +28,14 @@ public interface EventTrackMapper extends BaseMapper<EventTrack> {
...
@@ -28,14 +28,14 @@ public interface EventTrackMapper extends BaseMapper<EventTrack> {
DayNumVo
getTgNumByType
(
@Param
(
"date"
)
String
date
,
@Param
(
"dateString"
)
String
dateString
,
@Param
(
"siteId"
)
Long
siteId
);
DayNumVo
getTgNumByType
(
@Param
(
"date"
)
String
date
,
@Param
(
"dateString"
)
String
dateString
,
@Param
(
"siteId"
)
Long
siteId
);
List
<
EventTrackTypeNumVo
>
queryNumByType
(
@Param
(
"deptId"
)
Long
deptId
,
@Param
(
"date"
)
String
date
,
@Param
(
"dateString"
)
String
dateString
,
@Param
(
"types"
)
List
<
Integer
>
types
,
@Param
(
"subNameList"
)
List
<
String
>
subNameList
,
@Param
(
"siteId"
)
Long
siteId
,
List
<
EventTrackTypeNumVo
>
queryNumByType
(
@Param
(
"deptId"
)
Long
deptId
,
@Param
(
"date"
)
String
date
,
@Param
(
"dateString"
)
String
dateString
,
@Param
(
"types"
)
List
<
Integer
>
types
,
@Param
(
"subNameList"
)
List
<
String
>
subNameList
,
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"isPre"
)
Boolean
isPre
,
@Param
(
"remark2"
)
String
remark2
);
@Param
(
"isPre"
)
Boolean
isPre
);
List
<
EventTrackTypeNumVo
>
queryNumByTypeInformation
(
@Param
(
"deptId"
)
Long
deptId
,
@Param
(
"date"
)
String
date
,
@Param
(
"dateString"
)
String
dateString
,
@Param
(
"types"
)
List
<
Integer
>
types
,
@Param
(
"subNameList"
)
List
<
Long
>
subNameList
,
@Param
(
"siteId"
)
Long
siteId
,
List
<
EventTrackTypeNumVo
>
queryNumByTypeInformation
(
@Param
(
"deptId"
)
Long
deptId
,
@Param
(
"date"
)
String
date
,
@Param
(
"dateString"
)
String
dateString
,
@Param
(
"types"
)
List
<
Integer
>
types
,
@Param
(
"subNameList"
)
List
<
Long
>
subNameList
,
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"isPre"
)
Boolean
isPre
);
@Param
(
"isPre"
)
Boolean
isPre
);
List
<
EventTrackTypeNumVo
>
queryTgNumByDept
(
@Param
(
"deptName"
)
String
deptName
,
@Param
(
"typeId"
)
Long
typeId
,
@Param
(
"siteId"
)
Long
siteId
);
List
<
EventTrackTypeNumVo
>
queryTgNumByDept
(
@Param
(
"deptName"
)
String
deptName
,
@Param
(
"typeId"
)
Long
typeId
,
@Param
(
"siteId"
)
Long
siteId
);
List
<
EventTrack
DeptNumVo
>
queryDeptByType
(
@Param
(
"date"
)
String
date
,
@Param
(
"dateString"
)
String
dateString
,
@Param
(
"types"
)
List
<
Integer
>
types
,
@Param
(
"siteId"
)
Long
siteId
);
List
<
EventTrack
TypeNumVo
>
queryDeptByType
(
@Param
(
"deptId"
)
Long
deptId
,
@Param
(
"dateString"
)
String
dateString
,
@Param
(
"types"
)
List
<
Integer
>
types
,
@Param
(
"siteId"
)
Long
siteId
);
Integer
getNum
(
@Param
(
"type"
)
Integer
type
,
@Param
(
"businessId"
)
Long
businessId
,
@Param
(
"siteId"
)
Long
siteId
);
Integer
getNum
(
@Param
(
"type"
)
Integer
type
,
@Param
(
"businessId"
)
Long
businessId
,
@Param
(
"siteId"
)
Long
siteId
);
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/EventTrackServiceImpl.java
View file @
ec599564
...
@@ -439,7 +439,7 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
...
@@ -439,7 +439,7 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
if
(
types
.
size
()
==
1
){
if
(
types
.
size
()
==
1
){
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
{
eventTrackTypeNumVoList
=
this
.
baseMapper
.
queryNumByType
(
null
,
date
,
dateString
,
types
,
subNameList
,
context
.
getSiteId
(),
isPre
,
null
);
eventTrackTypeNumVoList
=
this
.
baseMapper
.
queryNumByType
(
null
,
date
,
dateString
,
types
,
subNameList
,
context
.
getSiteId
(),
isPre
);
}
}
logger
.
info
(
"埋点统计行为统计查询结果:{}"
,
JSONUtil
.
toJsonStr
(
eventTrackTypeNumVoList
));
logger
.
info
(
"埋点统计行为统计查询结果:{}"
,
JSONUtil
.
toJsonStr
(
eventTrackTypeNumVoList
));
if
(
CollectionUtil
.
isNotEmpty
(
subNameList
)){
if
(
CollectionUtil
.
isNotEmpty
(
subNameList
)){
...
@@ -508,7 +508,7 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
...
@@ -508,7 +508,7 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
if
(
CollUtil
.
isNotEmpty
(
eventTrackDeptNumVoList
)){
if
(
CollUtil
.
isNotEmpty
(
eventTrackDeptNumVoList
)){
String
finalDate
=
date
;
String
finalDate
=
date
;
eventTrackDeptNumVoList
.
stream
().
forEach
(
eventTrackDeptNumVo
->
{
eventTrackDeptNumVoList
.
stream
().
forEach
(
eventTrackDeptNumVo
->
{
List
<
EventTrackTypeNumVo
>
eventTrackTypeNumVoList
=
this
.
baseMapper
.
query
NumByType
(
eventTrackDeptNumVo
.
getDeptId
(),
finalDate
,
dateString
,
types
,
null
,
context
.
getSiteId
(),
false
,
"1"
);
List
<
EventTrackTypeNumVo
>
eventTrackTypeNumVoList
=
this
.
baseMapper
.
query
DeptByType
(
eventTrackDeptNumVo
.
getDeptId
(),
dateString
,
types
,
context
.
getSiteId
()
);
if
(
CollectionUtil
.
isNotEmpty
(
eventTrackTypeNumVoList
)){
if
(
CollectionUtil
.
isNotEmpty
(
eventTrackTypeNumVoList
)){
List
<
EventTrackTypeNumVo
>
voList
=
Lists
.
newArrayList
();
List
<
EventTrackTypeNumVo
>
voList
=
Lists
.
newArrayList
();
eventTrackTypeNumVoList
.
stream
().
forEach
(
numVo
->{
eventTrackTypeNumVoList
.
stream
().
forEach
(
numVo
->{
...
...
cloud-site-service/src/main/resources/mapper/EventTrackMapper.xml
View file @
ec599564
...
@@ -60,37 +60,25 @@
...
@@ -60,37 +60,25 @@
<if
test=
"deptId!=null"
>
<if
test=
"deptId!=null"
>
and e.dept_id = #{deptId}
and e.dept_id = #{deptId}
</if>
</if>
<if
test=
"remark2!=null"
>
and e.remark2 = #{remark2}
</if>
group by e.type,e.sub_type
group by e.type,e.sub_type
order by e.type
order by e.type
</select>
</select>
<select
id=
"queryDeptByType"
resultType=
"com.yizhi.site.application.vo.site.EventTrack
Dept
NumVo"
>
<select
id=
"queryDeptByType"
resultType=
"com.yizhi.site.application.vo.site.EventTrack
Type
NumVo"
>
select
select
e.dept_id as deptId,e.dept_name as deptName,count(1) as num from event_track e
e.type,e.sub_type as subType,count(t.id) as num
from event_track e
LEFT JOIN event_track t ON e.id=t.id
and DATE_FORMAT(e.create_time, '%Y') = #{dateString}
where e.deleted =0
where e.deleted =0
and e.dept_id in (SELECT id FROM cloud_system.authz_user_group where site_id = #{siteId})
and e.dept_id in (SELECT id FROM cloud_system.authz_user_group where site_id = #{siteId})
<if
test=
"date==4"
>
AND (e.type IN (3,14) or ( e.type in (13) and e.remark2 = 1))
and WEEK(e.create_time) = WEEK(now()) and DATE_FORMAT(e.create_time, '%Y') = DATE_FORMAT(now(), '%Y')
<if
test=
"deptId!=null"
>
</if>
and e.dept_id = #{deptId}
<if
test=
"date==3"
>
and DATE_FORMAT(e.create_time, '%Y-%m-%d') = #{dateString}
</if>
<if
test=
"date==2"
>
and DATE_FORMAT(e.create_time, '%Y-%m') = #{dateString}
</if>
<if
test=
"date==1"
>
and DATE_FORMAT(e.create_time, '%Y') = #{dateString}
</if>
<if
test=
"types!=null and types.size()>0"
>
AND e.type IN
<foreach
collection=
"types"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</if>
group by e.dept_name
group by e.type,e.sub_type
order by e.type
</select>
</select>
<select
id=
"getNumByType"
resultType=
"com.yizhi.site.application.vo.site.DayNumVo"
>
<select
id=
"getNumByType"
resultType=
"com.yizhi.site.application.vo.site.DayNumVo"
>
select ifnull(sum(num),0) as num,ifnull(sum(preNum),0) as preNum
select ifnull(sum(num),0) as num,ifnull(sum(preNum),0) as preNum
from(
from(
...
@@ -365,10 +353,10 @@
...
@@ -365,10 +353,10 @@
</select>
</select>
<select
id=
"queryTrainningNumBydeptId"
resultType=
"com.yizhi.site.application.vo.site.EventTrackTypeNumVo"
>
<select
id=
"queryTrainningNumBydeptId"
resultType=
"com.yizhi.site.application.vo.site.EventTrackTypeNumVo"
>
SELECT agm.group_id AS subType,count(
DISTINCT tvr.create_by_id
) AS num
SELECT agm.group_id AS subType,count(
*
) AS num
FROM cloud_trainning_project.training_project tvr
FROM cloud_trainning_project.training_project tvr
INNER JOIN cloud_system.authz_group_member agm ON agm.member_id=tvr.org_id AND agm.deleted = 0
INNER JOIN cloud_system.authz_group_member agm ON agm.member_id=tvr.org_id AND agm.deleted = 0
WHERE tvr.
status=1 AND tvr.
deleted=0
WHERE tvr.deleted=0
GROUP BY agm.group_id
GROUP BY agm.group_id
</select>
</select>
...
...
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