|
@ -158,10 +158,10 @@ public class StatisticsService {
|
|
|
|
|
|
// activity-1 活动浏览次数
|
|
|
// activity-2 公艺课程播放
|
|
|
String sql = " SELECT activity_type, COUNT(id) FROM base_activity_click WHERE activity_type IN (1, 2) GROUP BY activity_type";
|
|
|
String sql = " SELECT activity_type, COUNT(id) total FROM base_activity_click WHERE activity_type IN (1, 2) GROUP BY activity_type";
|
|
|
List<Map<String, Object>> lists = jdbcTemplate.queryForList(sql);
|
|
|
for (Map<String, Object> tmp : lists) {
|
|
|
Integer num = Integer.parseInt(tmp.get("id").toString());
|
|
|
Integer num = Integer.parseInt(tmp.get("total").toString());
|
|
|
res.put("activity_" + tmp.get("activity_type").toString(), num);
|
|
|
}
|
|
|
|
|
@ -289,10 +289,10 @@ public class StatisticsService {
|
|
|
|
|
|
// activity-1 活动浏览次数
|
|
|
// activity-2 公艺课程播放
|
|
|
String sql = " SELECT activity_type, COUNT(id) FROM base_activity_click WHERE activity_type IN (1, 2) GROUP BY activity_type";
|
|
|
String sql = " SELECT activity_type, COUNT(id) total FROM base_activity_click WHERE activity_type IN (1, 2) GROUP BY activity_type";
|
|
|
List<Map<String, Object>> lists = jdbcTemplate.queryForList(sql);
|
|
|
for (Map<String, Object> tmp : lists) {
|
|
|
Integer num = Integer.parseInt(tmp.get("id").toString());
|
|
|
Integer num = Integer.parseInt(tmp.get("total").toString());
|
|
|
res.put("activity_" + tmp.get("activity_type").toString(), num);
|
|
|
}
|
|
|
|
|
@ -1814,12 +1814,8 @@ public class StatisticsService {
|
|
|
String[] split = index.split(",");
|
|
|
for (String ind : split) {
|
|
|
long total = 0l;
|
|
|
List<SaveModel> list = elasticsearchUtil.findDateAllQuotaLevel1(endDate, endDate, "330100", 2, ind, SaveModel.timeLevel_DDL, null, null, "2");
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
SaveModel saveModel = list.get(i);
|
|
|
total+=saveModel.getResult2().longValue();
|
|
|
}
|
|
|
res.put("index_"+ind,total);
|
|
|
SaveModel saveModelAdd = elasticsearchUtil.findOneDateQuotaLevel0(endDate, endDate, "330100", 2, ind, SaveModel.timeLevel_DDL, "6");
|
|
|
res.put("index_"+ind, saveModelAdd.getResult2().longValue());
|
|
|
}
|
|
|
Long index_28 = (Long) res.get("index_28");
|
|
|
Long index_29 = (Long) res.get("index_29");
|