🎨 完善统计功能及错误参数修改
This commit is contained in:
parent
44defa3aa9
commit
7265554608
@ -18,5 +18,5 @@ public class Dashboard {
|
|||||||
|
|
||||||
private Integer countViewNum;
|
private Integer countViewNum;
|
||||||
|
|
||||||
private Integer toadyViewNum;
|
private Integer todayViewNum;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package com.rymcu.vertical.mapper;
|
package com.rymcu.vertical.mapper;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ronger
|
* @author ronger
|
||||||
*/
|
*/
|
||||||
@ -16,7 +18,27 @@ public interface DashboardMapper {
|
|||||||
* */
|
* */
|
||||||
Integer selectNewUserCount();
|
Integer selectNewUserCount();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取文章总数
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
Integer selectArticleCount();
|
Integer selectArticleCount();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取今日发布文章总数
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
Integer selectNewArticleCount();
|
Integer selectNewArticleCount();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取浏览量总数
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer selectCountViewNum();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取今日浏览总数
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer selectTodayViewNum();
|
||||||
}
|
}
|
||||||
|
@ -23,9 +23,8 @@ public class DashboardServiceImpl implements DashboardService {
|
|||||||
dashboard.setNewUserNum(dashboardMapper.selectNewUserCount());
|
dashboard.setNewUserNum(dashboardMapper.selectNewUserCount());
|
||||||
dashboard.setCountArticleNum(dashboardMapper.selectArticleCount());
|
dashboard.setCountArticleNum(dashboardMapper.selectArticleCount());
|
||||||
dashboard.setNewArticleNum(dashboardMapper.selectNewArticleCount());
|
dashboard.setNewArticleNum(dashboardMapper.selectNewArticleCount());
|
||||||
// TODO 待完成浏览量统计
|
dashboard.setCountViewNum(dashboardMapper.selectCountViewNum());
|
||||||
dashboard.setCountViewNum(1000);
|
dashboard.setTodayViewNum(dashboardMapper.selectTodayViewNum());
|
||||||
dashboard.setToadyViewNum(100);
|
|
||||||
return dashboard;
|
return dashboard;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,4 +15,11 @@
|
|||||||
select count(*) from vertical_article where created_time between date_sub(sysdate(),interval 1 day)
|
select count(*) from vertical_article where created_time between date_sub(sysdate(),interval 1 day)
|
||||||
and date_sub(sysdate(),interval - 1 day)
|
and date_sub(sysdate(),interval - 1 day)
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectCountViewNum" resultType="java.lang.Integer">
|
||||||
|
select count(*) from vertical_visit
|
||||||
|
</select>
|
||||||
|
<select id="selectTodayViewNum" resultType="java.lang.Integer">
|
||||||
|
select count(*) from vertical_visit where created_time between date_sub(sysdate(),interval 1 day)
|
||||||
|
and date_sub(sysdate(),interval - 1 day)
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue
Block a user