bug 3061、3059 修改
This commit is contained in:
parent
a3fc3246fc
commit
6e2b1f348f
|
@ -1,5 +1,6 @@
|
|||
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.KeyValueVo;
|
||||
import com.microservices.dms.achievementLibrary.domain.MemoTotalVo;
|
||||
|
@ -74,7 +75,7 @@ public class MemoDashboardService {
|
|||
* @return
|
||||
*/
|
||||
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])
|
||||
.stream().collect(Collectors.toMap(KeyValVo::getK, KeyValVo::getV));
|
||||
|
||||
|
|
|
@ -496,13 +496,14 @@
|
|||
|
||||
<select id="getForumSectionStatistic" resultType="com.microservices.dms.achievementLibrary.domain.KeyValueVo">
|
||||
select a.ancestry as "key", fs.title as "name", a.tmp as "value"
|
||||
from (select f.ancestry, count(1) as "tmp"
|
||||
from memos m
|
||||
left join forum_sections f on m.forum_section_id = f.id
|
||||
from (
|
||||
select IFNULL(f.ancestry, m.forum_section_id) as"ancestry",count(1) as "tmp" from memos m
|
||||
inner join forum_sections f on m.forum_section_id = f.id
|
||||
where m.destroy_status is null
|
||||
and m.hidden = 0
|
||||
and m.published_at is not null
|
||||
group by f.ancestry) a
|
||||
group by IFNULL(f.ancestry, m.forum_section_id)
|
||||
) a
|
||||
left join forum_sections fs on fs.id = a.ancestry
|
||||
ORDER BY a.ancestry DESC
|
||||
</select>
|
||||
|
@ -526,13 +527,13 @@
|
|||
</select>
|
||||
|
||||
<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
|
||||
where praise_tread_object_type='Memo'
|
||||
and created_at >= #{s}
|
||||
and created_at <= #{e}
|
||||
group by DATE_FORMAT(created_at, '%Y-%m-%d')
|
||||
order by DATE_FORMAT(created_at, '%Y-%m-%d')
|
||||
group by DATE_FORMAT(created_at, '%m-%d')
|
||||
order by DATE_FORMAT(created_at, '%m-%d')
|
||||
</select>
|
||||
|
||||
<select id="getExpertInfoById" resultType="com.microservices.dms.resourceLibrary.domain.vo.ExpertAttachmentVo">
|
||||
|
|
Loading…
Reference in New Issue