|
...
|
...
|
@@ -101,7 +101,7 @@ public class AiragLogServiceImpl extends ServiceImpl<AiragLogMapper, AiragLog> i |
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public Map<String, Object> getStatistics() {
|
|
|
|
public Map<String, Object> getStatistics(String rangeType, String startTime, String endTime) {
|
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
|
|
|
|
|
// 1. 获取今日问答次数
|
|
...
|
...
|
@@ -144,12 +144,18 @@ public class AiragLogServiceImpl extends ServiceImpl<AiragLogMapper, AiragLog> i |
|
|
|
}
|
|
|
|
|
|
|
|
// 7.获取按钮问题和按钮code次数,只获取有按钮code的问题(log.question)
|
|
|
|
List<Map<String, Object>> buttonStats = airagLogMapper.getButtonRankList();
|
|
|
|
List<Map<String, Object>> buttonStats = airagLogMapper.getButtonRankList(
|
|
|
|
rangeType,
|
|
|
|
startTime,
|
|
|
|
endTime
|
|
|
|
);
|
|
|
|
// 8.对按钮进行今日本周本月本年的实时查询和根据选定日期范围内的查询
|
|
|
|
|
|
|
|
// 8. 获取最近12个月的月度数据
|
|
|
|
|
|
|
|
// 9. 获取最近12个月的月度数据
|
|
|
|
List<Map<String, Object>> monthlyData = airagLogMapper.getMonthlyCount();
|
|
|
|
|
|
|
|
// 9. 添加前一天数据
|
|
|
|
// 10. 添加前一天数据
|
|
|
|
result.put("yesterdayCount", yesterdayCount);
|
|
|
|
result.put("growthRate", Math.round(growthRate * 100.0) / 100.0); // 保留两位小数
|
|
|
|
result.put("todayCount", todayCount);
|
|
...
|
...
|
@@ -162,9 +168,5 @@ public class AiragLogServiceImpl extends ServiceImpl<AiragLogMapper, AiragLog> i |
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* @Override
|
|
|
|
public List<T> list(Page<AiragLog> page, QueryWrapper<AiragLog> queryWrapper) {
|
|
|
|
|
|
|
|
}*/
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|