bug 3061、3059 修改

This commit is contained in:
13036795865 2025-05-26 14:36:11 +08:00
parent a3fc3246fc
commit 6e2b1f348f
2 changed files with 14 additions and 12 deletions

View File

@ -1,5 +1,6 @@
package com.microservices.dms.achievementLibrary.service; package com.microservices.dms.achievementLibrary.service;
import com.microservices.common.core.utils.StringUtils;
import com.microservices.dms.achievementLibrary.domain.AchQueryVo; import com.microservices.dms.achievementLibrary.domain.AchQueryVo;
import com.microservices.dms.achievementLibrary.domain.KeyValueVo; import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
import com.microservices.dms.achievementLibrary.domain.MemoTotalVo; import com.microservices.dms.achievementLibrary.domain.MemoTotalVo;
@ -74,7 +75,7 @@ public class MemoDashboardService {
* @return * @return
*/ */
public List<KeyValVo<String, Long>> get7DayPaise() { public List<KeyValVo<String, Long>> get7DayPaise() {
Date[] days = DateUtil.getDays(1, 7); Date[] days = DateUtil.getDays(0, 6);
Map<String, Long> w = memoResourceLibraryMapper.get7DayPaise(days[0], days[1]) Map<String, Long> w = memoResourceLibraryMapper.get7DayPaise(days[0], days[1])
.stream().collect(Collectors.toMap(KeyValVo::getK, KeyValVo::getV)); .stream().collect(Collectors.toMap(KeyValVo::getK, KeyValVo::getV));

View File

@ -496,14 +496,15 @@
<select id="getForumSectionStatistic" resultType="com.microservices.dms.achievementLibrary.domain.KeyValueVo"> <select id="getForumSectionStatistic" resultType="com.microservices.dms.achievementLibrary.domain.KeyValueVo">
select a.ancestry as "key", fs.title as "name", a.tmp as "value" select a.ancestry as "key", fs.title as "name", a.tmp as "value"
from (select f.ancestry, count(1) as "tmp" from (
from memos m select IFNULL(f.ancestry, m.forum_section_id) as"ancestry",count(1) as "tmp" from memos m
left join forum_sections f on m.forum_section_id = f.id inner join forum_sections f on m.forum_section_id = f.id
where m.destroy_status is null where m.destroy_status is null
and m.hidden = 0 and m.hidden = 0
and m.published_at is not null and m.published_at is not null
group by f.ancestry) a group by IFNULL(f.ancestry, m.forum_section_id)
left join forum_sections fs on fs.id = a.ancestry ) a
left join forum_sections fs on fs.id = a.ancestry
ORDER BY a.ancestry DESC ORDER BY a.ancestry DESC
</select> </select>
@ -526,13 +527,13 @@
</select> </select>
<select id="get7DayPaise" resultType="com.microservices.dms.resourceLibrary.domain.vo.KeyValVo"> <select id="get7DayPaise" resultType="com.microservices.dms.resourceLibrary.domain.vo.KeyValVo">
select DATE_FORMAT(created_at, '%Y-%m-%d') as 'k', count(*) as 'v' select DATE_FORMAT(created_at, '%m-%d') as 'k', count(*) as 'v'
from praise_treads from praise_treads
where praise_tread_object_type='Memo' where praise_tread_object_type='Memo'
and created_at &gt;= #{s} and created_at &gt;= #{s}
and created_at &lt;= #{e} and created_at &lt;= #{e}
group by DATE_FORMAT(created_at, '%Y-%m-%d') group by DATE_FORMAT(created_at, '%m-%d')
order by DATE_FORMAT(created_at, '%Y-%m-%d') order by DATE_FORMAT(created_at, '%m-%d')
</select> </select>
<select id="getExpertInfoById" resultType="com.microservices.dms.resourceLibrary.domain.vo.ExpertAttachmentVo"> <select id="getExpertInfoById" resultType="com.microservices.dms.resourceLibrary.domain.vo.ExpertAttachmentVo">