Commit e422a156 by tyfanchz

修改统计数据返回格式

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