Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saasio
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
reyun
saasio
Commits
dfae8f9a
Commit
dfae8f9a
authored
Mar 28, 2018
by
carrieyzzhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同上
parent
e7dd7b33
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
ComplicatedEventsServiceImpl.java
.../com/reyun/service/impl/ComplicatedEventsServiceImpl.java
+11
-3
No files found.
src/main/java/com/reyun/service/impl/ComplicatedEventsServiceImpl.java
View file @
dfae8f9a
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment