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
ce2b5f33
Commit
ce2b5f33
authored
Mar 27, 2018
by
carrieyzzhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
event stats total
parent
7672f5d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
ComplicatedEventsServiceImpl.java
.../com/reyun/service/impl/ComplicatedEventsServiceImpl.java
+20
-2
No files found.
src/main/java/com/reyun/service/impl/ComplicatedEventsServiceImpl.java
View file @
ce2b5f33
...
...
@@ -228,7 +228,7 @@ public class ComplicatedEventsServiceImpl implements ComplicateEventsService{
EventReportCallable
c1
=
new
EventReportCallable
(
conditions
,
selectList
,
groupJsonArray
,
app
,
accountId
,
startDate
,
endDate
,
eventCondition
,
viewType
,
url
);
EventReportCallable
c2
=
new
EventReportCallable
(
null
,
null
,
null
,
app
,
accountId
,
startDate
,
endDate
,
eventCondition
,
viewType
,
ur
l
);
app
,
accountId
,
startDate
,
endDate
,
eventCondition
,
viewType
,
nul
l
);
//执行任务并获取Future对象
Future
<
Map
<
String
,
List
>>
f1
=
pool
.
submit
(
c1
);
Future
<
Map
<
String
,
List
>>
f2
=
pool
.
submit
(
c2
);
...
...
@@ -276,6 +276,9 @@ public class ComplicatedEventsServiceImpl implements ComplicateEventsService{
return
jsonObject
.
getString
(
"field"
);
}
});
//数据权限过滤
Account
account
=
accountRepository
.
findOne
(
accountId
);
querySql
=
querySql
.
replace
(
"$campaign"
,
""
);
...
...
@@ -284,9 +287,24 @@ public class ComplicatedEventsServiceImpl implements ComplicateEventsService{
Map
<
String
,
String
>
conditions
=
buildQueryPrestoCondition
(
querySql
,
app
.
getAppkey
());
Map
<
String
,
List
>
responseJson
=
reportService
.
reportBySql
(
conditions
);
String
demoApps
=
configParamService
.
getConfigParamByKey
(
"demo_appkey"
);
List
<
String
>
demoAppList
=
Arrays
.
asList
(
demoApps
.
split
(
","
));
Map
<
String
,
List
>
responseJson
=
new
HashMap
<>();
if
(
demoAppList
.
contains
(
app
.
getAppkey
()))
{
String
url
=
"http://localhost:9010/api/trackingio/eventstats/complicated/total/"
+
app
.
getAppkey
();
try
{
String
responseStr
=
HttpClientUtil
.
doHttpPostRequest
(
url
,
"trackingio"
,
conditions
);
ObjectMapper
mapper
=
new
ObjectMapper
();
responseJson
=
mapper
.
readValue
(
responseStr
,
Map
.
class
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"fail to get demo data......"
);
}
}
else
{
responseJson
=
reportService
.
reportBySql
(
conditions
);
}
//格式化汇总数据
return
formatTotalValueDate
(
appId
,
accountId
,
responseJson
,
groupArray
,
selectFieldList
);
}
...
...
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