Commit dfae8f9a by carrieyzzhang

同上

parent e7dd7b33
......@@ -256,6 +256,8 @@ public class ComplicatedEventsServiceImpl implements ComplicateEventsService{
@Override
public List<JSONObject> queryDistinctTotalData(Long appId, Long accountId, String startDate, String endDate, String eventCondition, String viewType) {
System.out.println("start total calculate");
List<JSONObject> result = new ArrayList<>();
App app = appRepository.findOne(appId);
......@@ -288,12 +290,15 @@ public class ComplicatedEventsServiceImpl implements ComplicateEventsService{
Map<String, String> conditions = buildQueryPrestoCondition(querySql, app.getAppkey());
String demoApps = configParamService.getConfigParamByKey("demo_appkey");
List<String> demoAppList = Arrays.asList(demoApps.split(","));
Map<String, List> responseJson = new HashMap<>();
if (demoAppList.contains(app.getAppkey())) {
System.out.println("start to get demo data");
String url = Constant.demoUrl + "/api/trackingio/eventstats/complicated/total/" + app.getAppkey();
System.out.println(url);
......@@ -304,7 +309,7 @@ public class ComplicatedEventsServiceImpl implements ComplicateEventsService{
} catch (Exception e) {
logger.error("fail to get demo data......");
}
System.out.println("end to get demo data");
} else {
responseJson = reportService.reportBySql(conditions);
}
......@@ -318,6 +323,8 @@ public class ComplicatedEventsServiceImpl implements ComplicateEventsService{
*/
private List<JSONObject> formatTotalValueDate(Long appId, Long accountId, Map<String, List> responseJson, JSONArray groupArray, List<String> selectFieldList) {
System.out.println("start tp format total value");
List<JSONObject> result = new ArrayList<>();
//处理数据
......@@ -334,7 +341,7 @@ public class ComplicatedEventsServiceImpl implements ComplicateEventsService{
Map<String, String> campaignMap = new HashMap<>();
Map<String, String> channelMap = new HashMap<>();
//group by _cid or group by _campaignid
/*//group by _cid or group by _campaignid
if (groupArray.toString().contains(FIELD_CID) || groupArray.toString().contains(FIELD_CAMPAIGN_ID)) {
Account account = accountRepository.findOne(accountId);
App app = appRepository.findOne(appId);
......@@ -361,7 +368,7 @@ public class ComplicatedEventsServiceImpl implements ComplicateEventsService{
}
}
}*/
//翻译处理
for (Object valElement : responseValueArray) {
......@@ -383,6 +390,7 @@ public class ComplicatedEventsServiceImpl implements ComplicateEventsService{
result = calculateTotalPercent(result, selectFieldList);
}
System.out.println("end to calculate total value");
return result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment