Commit e422a156 by tyfanchz

修改统计数据返回格式

1 parent 80b1ba28
package cn.com.glsx.openplatform.service;
import java.util.List;
import java.util.Map;
/**
......@@ -12,9 +13,9 @@ import java.util.Map;
public interface IndexService {
Map<String, Integer> getUcSummaryStatistic(String customerName);
Map<String, Long> getUcDeviceActivationStatistic(String customerName);
List<Map<String, Object>> getUcDeviceActivationStatistic(String customerName);
Map<String, Long> getUcUserActivityStatistic(String customerName);
List<Map<String, Object>> getUcUserActivityStatistic(String customerName);
Map<String, Long> getUcAppDownloadStatistic(String customerName);
List<Map<String, Object>> getUcAppDownloadStatistic(String customerName);
}
......@@ -5,7 +5,6 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import cn.com.glsx.openplatform.mapper.PlatformAppDownloadMapper;
import cn.com.glsx.openplatform.mapper.PlatformDeviceMapper;
import cn.com.glsx.openplatform.mapper.PlatformUserMapper;
......@@ -48,36 +47,30 @@ public class IndexServiceImpl implements IndexService {
}
@Override
public Map<String, Long> getUcDeviceActivationStatistic(String customerName) {
Map<String, Long> statisticMap;
List<Map<String, Object>> columnList = this.deviceMapper.getDeviceActivationStatistic(
public List<Map<String, Object>> getUcDeviceActivationStatistic(String customerName) {
List<Map<String, Object>> statisticList = this.deviceMapper.getDeviceActivationStatistic(
this.getStatisticStartTime(), this.getStatisticEndTime(),
customerName);
statisticMap = this.convertColumnToMap(columnList);
return statisticMap;
return statisticList;
}
@Override
public Map<String, Long> getUcUserActivityStatistic(String customerName) {
Map<String, Long> statisticMap;
List<Map<String, Object>> columnList = this.userMapper.getUserActivityStatistic(
public List<Map<String, Object>> getUcUserActivityStatistic(String customerName) {
List<Map<String, Object>> statisticList = this.userMapper.getUserActivityStatistic(
this.getStatisticStartTime(), this.getStatisticEndTime(),
customerName);
statisticMap = this.convertColumnToMap(columnList);
return statisticMap;
return statisticList;
}
@Override
public Map<String, Long> getUcAppDownloadStatistic(String customerName) {
Map<String, Long> statisticMap;
List<Map<String, Object>> columnList = this.appDownloadMapper.getAppDownloadStatistic(
public List<Map<String, Object>> getUcAppDownloadStatistic(String customerName) {
List<Map<String, Object>> statisticList = this.appDownloadMapper.getAppDownloadStatistic(
this.getStatisticStartTime(), this.getStatisticEndTime(),
customerName);
statisticMap = this.convertColumnToMap(columnList);
return statisticMap;
return statisticList;
}
private Date getStatisticStartTime() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!