|
@@ -29,6 +29,7 @@ import org.springframework.transaction.annotation.Propagation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -98,11 +99,12 @@ public class AdServiceImpl implements AdService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * TODO 查询各渠道应用收益分时统计
|
|
|
|
|
|
|
+ * 查询各渠道应用收益分时统计
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
public DashboardRevenueVO revenueStatics(String apkIds) {
|
|
public DashboardRevenueVO revenueStatics(String apkIds) {
|
|
|
DashboardRevenueVO vo = new DashboardRevenueVO();
|
|
DashboardRevenueVO vo = new DashboardRevenueVO();
|
|
|
|
|
+ List<DashboardAppRevenueVO> appRevenueList = new ArrayList<>();
|
|
|
//查询出各应用的用户及收益数据
|
|
//查询出各应用的用户及收益数据
|
|
|
List<String> appIdList = Arrays.asList(apkIds.split(","));
|
|
List<String> appIdList = Arrays.asList(apkIds.split(","));
|
|
|
int index = appIdList.size();
|
|
int index = appIdList.size();
|
|
@@ -113,9 +115,14 @@ public class AdServiceImpl implements AdService {
|
|
|
String appId = appIdList.get(index);
|
|
String appId = appIdList.get(index);
|
|
|
//根据应用ID查询收益数据及个小时数据
|
|
//根据应用ID查询收益数据及个小时数据
|
|
|
DashboardAppRevenueVO appRevenueVO = adRecordMapper.getHourRevenue(appId);
|
|
DashboardAppRevenueVO appRevenueVO = adRecordMapper.getHourRevenue(appId);
|
|
|
-
|
|
|
|
|
|
|
+ appRevenueList.add(appRevenueVO);
|
|
|
|
|
+ countDownLatch.countDown();
|
|
|
}while (index<0);
|
|
}while (index<0);
|
|
|
- return null;
|
|
|
|
|
|
|
+ vo.setAppRevenueList(appRevenueList);
|
|
|
|
|
+ vo.setTodayTotalRevenue(adRecordMapper.getRevenueByType(apkIds,1));
|
|
|
|
|
+ vo.setYesterdayTotalRevenue(adRecordMapper.getRevenueByType(apkIds,2));
|
|
|
|
|
+ vo.setMonthTotalRevenue(adRecordMapper.getRevenueByType(apkIds,3));
|
|
|
|
|
+ return vo;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|