Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lwby_copyright_book_data
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
maliang
lwby_copyright_book_data
Commits
e373a3c9
Commit
e373a3c9
authored
Apr 27, 2020
by
maliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限控制
parent
4de75497
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
AdvertiserServiceImpl.java
...t/security/server/service/impl/AdvertiserServiceImpl.java
+11
-3
No files found.
src/main/java/com/boot/security/server/service/impl/AdvertiserServiceImpl.java
View file @
e373a3c9
...
@@ -237,8 +237,8 @@ public class AdvertiserServiceImpl implements AdvertiserService {
...
@@ -237,8 +237,8 @@ public class AdvertiserServiceImpl implements AdvertiserService {
Map
<
String
,
List
<
String
>>
exposure
=
minutesCodeIdExposure
.
stream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
.
split
(
","
)[
0
]));
Map
<
String
,
List
<
String
>>
exposure
=
minutesCodeIdExposure
.
stream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
.
split
(
","
)[
0
]));
JSONObject
resultClick
=
sumByKey
(
click
);
JSONObject
resultClick
=
sumByKey
(
click
);
JSONObject
resultExposure
=
sumByKey
(
exposure
);
JSONObject
resultExposure
=
sumByKey
(
exposure
);
Map
emap
=
JSON
.
parseObject
(
resultExposure
.
getString
(
"map"
)
);
Map
emap
=
resultExposure
.
getObject
(
"map"
,
Map
.
class
);
Map
cmap
=
JSON
.
parseObject
(
resultClick
.
getString
(
"map"
)
);
Map
cmap
=
resultClick
.
getObject
(
"map"
,
Map
.
class
);
Set
keySet
=
emap
.
keySet
();
Set
keySet
=
emap
.
keySet
();
for
(
Object
o
:
keySet
)
{
for
(
Object
o
:
keySet
)
{
if
(!
cmap
.
containsKey
(
o
)){
if
(!
cmap
.
containsKey
(
o
)){
...
@@ -253,8 +253,16 @@ public class AdvertiserServiceImpl implements AdvertiserService {
...
@@ -253,8 +253,16 @@ public class AdvertiserServiceImpl implements AdvertiserService {
Map
<
String
,
List
<
String
>>
exposure
=
minutesCodeIdExposure
.
stream
().
filter
(
x
->
x
.
split
(
","
)[
1
].
equals
(
advertId
)).
collect
(
Collectors
.
groupingBy
(
x
->
x
.
split
(
","
)[
0
]));
Map
<
String
,
List
<
String
>>
exposure
=
minutesCodeIdExposure
.
stream
().
filter
(
x
->
x
.
split
(
","
)[
1
].
equals
(
advertId
)).
collect
(
Collectors
.
groupingBy
(
x
->
x
.
split
(
","
)[
0
]));
JSONObject
resultClick
=
sumByKey
(
click
);
JSONObject
resultClick
=
sumByKey
(
click
);
JSONObject
resultExposure
=
sumByKey
(
exposure
);
JSONObject
resultExposure
=
sumByKey
(
exposure
);
Map
emap
=
resultExposure
.
getObject
(
"map"
,
Map
.
class
);
Map
cmap
=
resultClick
.
getObject
(
"map"
,
Map
.
class
);
Set
keySet
=
emap
.
keySet
();
for
(
Object
o
:
keySet
)
{
if
(!
cmap
.
containsKey
(
o
)){
cmap
.
put
(
o
,
0
);
}
}
jsonObject
.
put
(
"dataTime"
,
resultExposure
.
get
(
"dataTime"
));
jsonObject
.
put
(
"dataTime"
,
resultExposure
.
get
(
"dataTime"
));
jsonObject
.
put
(
"click"
,
resultClick
.
get
(
"sum"
));
jsonObject
.
put
(
"click"
,
sortMap
(
cmap
));
jsonObject
.
put
(
"exposure"
,
resultExposure
.
get
(
"sum"
));
jsonObject
.
put
(
"exposure"
,
resultExposure
.
get
(
"sum"
));
}
}
return
jsonObject
;
return
jsonObject
;
...
...
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