Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
browser-backend
Project
Project
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
Administrator
browser-backend
Commits
3c0201b0
Commit
3c0201b0
authored
Apr 15, 2020
by
renjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
fe8008da
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
AdministratorServiceImpl.java
...ackend/account/service/impl/AdministratorServiceImpl.java
+5
-0
No files found.
src/main/java/com/edgec/browserbackend/account/service/impl/AdministratorServiceImpl.java
View file @
3c0201b0
...
...
@@ -395,15 +395,18 @@ public class AdministratorServiceImpl implements AdministratorService {
Date
dateTime2
=
formatter
.
parse
(
strDate2
);
Page
<
Account
>
accountPage
=
accountRepository
.
findAllBySignupDateBetweenAndPromotionCodeAndParentIsNull
(
pageable
,
dateTime1
,
dateTime2
,
account
.
getPromotion
().
getCode
());
List
<
AccountPromotionDto
>
accountPromotionDtos
=
new
ArrayList
<>();
if
(
accountPage
.
getNumber
()
>
0
)
{
accountPage
.
get
().
forEach
(
account1
->
{
accountPromotionDtos
.
add
(
new
AccountPromotionDto
(
account1
));
});
}
Page
<
AccountPromotionDto
>
accountPromotionDtoPage
=
new
PageImpl
<
AccountPromotionDto
>(
accountPromotionDtos
);
promotionQueryResultDto
.
setUsers
(
accountPromotionDtoPage
);
List
<
Account
>
accounts
=
accountRepository
.
findAllBySignupDateBetweenAndPromotionCode
(
dateTime1
,
dateTime2
,
account
.
getPromotion
().
getCode
());
Promotion
promotion
=
new
Promotion
();
Account
finalAccount
=
account
;
if
(
accounts
!=
null
&&
accounts
.
size
()
>
0
)
{
accounts
.
forEach
(
x
->
{
promotion
.
setInvitedUsers
(
promotion
.
getInvitedUsers
()
+
1
);
List
<
UserPrePaidBilling
>
userPrePaidBillings
=
userPrePaidBillingRepository
.
findByAdministratorAndPayMethodInAndTimestampBetween
(
x
.
getName
(),
Arrays
.
asList
(
1
,
2
,
3
),
dateTime1
.
getTime
(),
dateTime2
.
getTime
());
...
...
@@ -425,6 +428,7 @@ public class AdministratorServiceImpl implements AdministratorService {
List
<
UserPrePaidBilling
>
userPrePaidBillings1
=
userPrePaidBillingRepository
.
findByAdministratorAndYearAndMonthAndPayMethodIn
(
secondPromote
.
getName
(),
YearMonth
.
now
().
minusMonths
(
1
).
getYear
(),
YearMonth
.
now
().
minusMonths
(
1
).
getMonthValue
(),
Arrays
.
asList
(
1
,
2
,
3
));
if
(
userPrePaidBillings1
!=
null
&&
userPrePaidBillings1
.
size
()
>
0
)
secondCommission
+=
userPrePaidBillings1
.
stream
().
mapToDouble
(
UserPrePaidBilling:
:
getTotal
).
sum
();
}
}
...
...
@@ -433,6 +437,7 @@ public class AdministratorServiceImpl implements AdministratorService {
promotion
.
setGift
(
promotion
.
getGift
()
+
x
.
getPromotion
().
getGift
());
promotion
.
setCommissionLastMonth
(
promotion
.
getCommissionLastMonth
()
+
x
.
getPromotion
().
getCommissionLastMonth
());
});
}
promotionQueryResultDto
.
setPromotion
(
promotion
);
return
promotionQueryResultDto
;
...
...
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