|
|
@@ -153,17 +153,19 @@ public class CountServiceImpl implements CountService {
|
|
|
*/
|
|
|
@Override
|
|
|
public Result<DashboardRevenueVO> getRevenueStatics(String appId) {
|
|
|
- List<AgentAppView> apkList = apkMapper.queryBySuperiorId(appId);
|
|
|
+ List<AgentAppView> apkList = apkMapper.queryBySuperiorId(appId);
|
|
|
String apkIds = apkList.stream().map(AgentAppView::getAppId).collect(Collectors.joining(","));
|
|
|
YtPlatformUserApp appInfo = appMapper.getByPrimary(appId);
|
|
|
- Object o = feignInvoker.invoke(appInfo.getServiceName(),"revenueStatics",apkIds);
|
|
|
+ Object o = feignInvoker.invoke(appInfo.getServiceName(), "revenueStatics", apkIds);
|
|
|
DashboardRevenueVO vo = JSONObject.parseObject(JSON.toJSONString(o), DashboardRevenueVO.class);
|
|
|
- Map<String, String> appNameMap = apkList.stream().collect(Collectors.toMap(AgentAppView::getAppId, AgentAppView::getAppName));
|
|
|
List<DashboardAppRevenueVO> appRevenueList = vo.getAppRevenueList();
|
|
|
- for (DashboardAppRevenueVO revenueVO : appRevenueList) {
|
|
|
- revenueVO.setAppName(appNameMap.get(revenueVO.getAppId()));
|
|
|
+ if (CollUtil.isNotEmpty(appRevenueList)) {
|
|
|
+ Map<String, String> appNameMap = apkList.stream().collect(Collectors.toMap(AgentAppView::getAppId, AgentAppView::getAppName));
|
|
|
+ for (DashboardAppRevenueVO revenueVO : appRevenueList) {
|
|
|
+ revenueVO.setAppName(appNameMap.get(revenueVO.getAppId()));
|
|
|
+ }
|
|
|
+ vo.setAppRevenueList(appRevenueList);
|
|
|
}
|
|
|
- vo.setAppRevenueList(appRevenueList);
|
|
|
return Result.resultObjOk(vo);
|
|
|
}
|
|
|
|