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
2d76a7f8
Commit
2d76a7f8
authored
Aug 23, 2025
by
梅存智
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
4e140d36
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
14 deletions
+57
-14
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
+2
-1
cloud-site-service/src/main/resources/mapper/EventTrackMapper.xml
+53
-13
No files found.
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/EventTrackMapper.java
View file @
2d76a7f8
...
...
@@ -47,4 +47,6 @@ public interface EventTrackMapper extends BaseMapper<EventTrack> {
Integer
getResearchJoinTotal
(
@Param
(
"year"
)
String
year
,
@Param
(
"siteId"
)
Long
siteId
);
Integer
getCommentNum
(
@Param
(
"businessId"
)
Long
businessId
,
@Param
(
"siteId"
)
Long
siteId
);
DayNumVo
getMailTgNumByType
(
@Param
(
"date"
)
String
date
,
@Param
(
"dateString"
)
String
dateString
,
@Param
(
"siteId"
)
Long
siteId
);
}
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/EventTrackServiceImpl.java
View file @
2d76a7f8
...
...
@@ -165,7 +165,8 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
}
String
dateString
=
getDateString
(
date
);
if
(
Objects
.
equals
(
types
.
get
(
0
),
5
)){
return
this
.
baseMapper
.
getTgNumByType
(
date
,
dateString
,
context
.
getSiteId
());
//return this.baseMapper.getTgNumByType(date,dateString,context.getSiteId()); //20250810按新需求注释,现统计党委和纪检信箱
return
this
.
baseMapper
.
getMailTgNumByType
(
date
,
dateString
,
context
.
getSiteId
());
}
if
(
Objects
.
equals
(
types
.
get
(
0
),
8
)){
String
year
=
DateUtil
.
toShortYear
(
new
Date
());
...
...
cloud-site-service/src/main/resources/mapper/EventTrackMapper.xml
View file @
2d76a7f8
...
...
@@ -19,21 +19,23 @@
<select
id=
"queryNumByType"
resultType=
"com.yizhi.site.application.vo.site.EventTrackTypeNumVo"
>
select
e.type,e.sub_type as subType,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
<if
test=
"date==4"
>
and WEEK(e.create_time) = WEEK(now()) and DATE_FORMAT(e.create_time, '%Y') = DATE_FORMAT(now(), '%Y')
</if>
<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>
where e.deleted =0
and e.dept_id in (SELECT id FROM cloud_system.authz_user_group where site_id = #{siteId})
<if
test=
"date==4"
>
and WEEK(e.create_time) = WEEK(now()) and DATE_FORMAT(e.create_time, '%Y') = DATE_FORMAT(now(), '%Y')
</if>
<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=
")"
>
...
...
@@ -263,4 +265,41 @@
and site_id = #{siteId}
) a
</select>
<select
id=
"getMailTgNumByType"
resultType=
"com.yizhi.site.application.vo.site.DayNumVo"
>
select ifnull(sum(num),0) as num,ifnull(sum(preNum),0) as preNum
from(
select
case when
<if
test=
"date==4"
>
WEEK(e.create_time) = WEEK(now()) and DATE_FORMAT(e.create_time, '%Y') = DATE_FORMAT(now(), '%Y')
</if>
<if
test=
"date==3"
>
DATE_FORMAT(e.create_time, '%Y-%m-%d') = #{dateString}
</if>
<if
test=
"date==2"
>
DATE_FORMAT(e.create_time, '%Y-%m') = #{dateString}
</if>
<if
test=
"date==1"
>
DATE_FORMAT(e.create_time, '%Y') = #{dateString}
</if>
then 1 else 0 end as num,
case when
<if
test=
"date==4"
>
WEEK(e.create_time) = WEEK(DATE_SUB(DATE_FORMAT(now(), '%Y-%m-%d'), INTERVAL 7 DAY)) and DATE_FORMAT(e.create_time, '%Y') = #{dateString}
</if>
<if
test=
"date==3"
>
DATE_SUB(DATE_FORMAT(e.create_time, '%Y-%m-%d'), INTERVAL -1 DAY) = #{dateString}
</if>
<if
test=
"date==2"
>
DATE_FORMAT(DATE_SUB(DATE_FORMAT(e.create_time, '%Y-%m-%d'), INTERVAL 1 MONTH),'%Y-%m') = #{dateString}
</if>
<if
test=
"date==1"
>
DATE_FORMAT(DATE_SUB(DATE_FORMAT(e.create_time, '%Y-%m-%d'), INTERVAL 1 YEAR),'%Y') = #{dateString}
</if>
then 1 else
0 end as preNum from system_mailbox e
where e.site_id = #{siteId} and e.state=4 and e.deleted=0
) a
</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