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
e6fee17d
Commit
e6fee17d
authored
Apr 15, 2020
by
renjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
3c0201b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
AccountRepository.java
.../browserbackend/account/repository/AccountRepository.java
+1
-1
AdministratorServiceImpl.java
...ackend/account/service/impl/AdministratorServiceImpl.java
+3
-3
No files found.
src/main/java/com/edgec/browserbackend/account/repository/AccountRepository.java
View file @
e6fee17d
...
@@ -29,7 +29,7 @@ public interface AccountRepository extends MongoRepository<Account, String>, Acc
...
@@ -29,7 +29,7 @@ public interface AccountRepository extends MongoRepository<Account, String>, Acc
Page
<
Account
>
findAllBySignupDateBetween
(
Pageable
pageable
,
Date
startDate
,
Date
endDate
);
Page
<
Account
>
findAllBySignupDateBetween
(
Pageable
pageable
,
Date
startDate
,
Date
endDate
);
List
<
Account
>
findAllBySignupDateBetweenAndPromotionCode
(
Date
startDate
,
Date
endDate
,
String
promotionCode
);
List
<
Account
>
findAllBySignupDateBetweenAndPromotionCode
AndParentIsNull
(
Date
startDate
,
Date
endDate
,
String
promotionCode
);
Page
<
Account
>
findAllBySignupDateBetweenAndPromotionCodeAndParentIsNull
(
Pageable
pageable
,
Date
startDate
,
Date
endDate
,
String
promotionCode
);
Page
<
Account
>
findAllBySignupDateBetweenAndPromotionCodeAndParentIsNull
(
Pageable
pageable
,
Date
startDate
,
Date
endDate
,
String
promotionCode
);
...
...
src/main/java/com/edgec/browserbackend/account/service/impl/AdministratorServiceImpl.java
View file @
e6fee17d
...
@@ -403,7 +403,7 @@ public class AdministratorServiceImpl implements AdministratorService {
...
@@ -403,7 +403,7 @@ public class AdministratorServiceImpl implements AdministratorService {
Page
<
AccountPromotionDto
>
accountPromotionDtoPage
=
new
PageImpl
<
AccountPromotionDto
>(
accountPromotionDtos
);
Page
<
AccountPromotionDto
>
accountPromotionDtoPage
=
new
PageImpl
<
AccountPromotionDto
>(
accountPromotionDtos
);
promotionQueryResultDto
.
setUsers
(
accountPromotionDtoPage
);
promotionQueryResultDto
.
setUsers
(
accountPromotionDtoPage
);
List
<
Account
>
accounts
=
accountRepository
.
findAllBySignupDateBetweenAndPromotionCode
(
dateTime1
,
dateTime2
,
account
.
getPromotion
().
getCode
());
List
<
Account
>
accounts
=
accountRepository
.
findAllBySignupDateBetweenAndPromotionCode
AndParentIsNull
(
dateTime1
,
dateTime2
,
account
.
getPromotion
().
getCode
());
Promotion
promotion
=
new
Promotion
();
Promotion
promotion
=
new
Promotion
();
Account
finalAccount
=
account
;
Account
finalAccount
=
account
;
if
(
accounts
!=
null
&&
accounts
.
size
()
>
0
)
{
if
(
accounts
!=
null
&&
accounts
.
size
()
>
0
)
{
...
@@ -411,7 +411,7 @@ public class AdministratorServiceImpl implements AdministratorService {
...
@@ -411,7 +411,7 @@ public class AdministratorServiceImpl implements AdministratorService {
promotion
.
setInvitedUsers
(
promotion
.
getInvitedUsers
()
+
1
);
promotion
.
setInvitedUsers
(
promotion
.
getInvitedUsers
()
+
1
);
List
<
UserPrePaidBilling
>
userPrePaidBillings
=
userPrePaidBillingRepository
.
findByAdministratorAndPayMethodInAndTimestampBetween
(
x
.
getName
(),
Arrays
.
asList
(
1
,
2
,
3
),
dateTime1
.
getTime
(),
dateTime2
.
getTime
());
List
<
UserPrePaidBilling
>
userPrePaidBillings
=
userPrePaidBillingRepository
.
findByAdministratorAndPayMethodInAndTimestampBetween
(
x
.
getName
(),
Arrays
.
asList
(
1
,
2
,
3
),
dateTime1
.
getTime
(),
dateTime2
.
getTime
());
double
totalCommission
=
0
;
double
totalCommission
=
0
;
if
(
userPrePaidBillings
!=
null
)
if
(
userPrePaidBillings
!=
null
&&
userPrePaidBillings
.
size
()
>
0
)
totalCommission
=
userPrePaidBillings
.
stream
().
mapToDouble
(
UserPrePaidBilling:
:
getTotal
).
sum
();
totalCommission
=
userPrePaidBillings
.
stream
().
mapToDouble
(
UserPrePaidBilling:
:
getTotal
).
sum
();
promotion
.
setTotalCommission
(
promotion
.
getTotalCommission
()
+
(
int
)
totalCommission
);
promotion
.
setTotalCommission
(
promotion
.
getTotalCommission
()
+
(
int
)
totalCommission
);
promotion
.
setCommission
(
promotion
.
getCommission
()
+
x
.
getPromotion
().
getCommission
());
promotion
.
setCommission
(
promotion
.
getCommission
()
+
x
.
getPromotion
().
getCommission
());
...
@@ -442,7 +442,7 @@ public class AdministratorServiceImpl implements AdministratorService {
...
@@ -442,7 +442,7 @@ public class AdministratorServiceImpl implements AdministratorService {
return
promotionQueryResultDto
;
return
promotionQueryResultDto
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
log
.
error
(
e
.
getMessage
()
,
e
);
throw
new
ClientRequestException
(
BrowserErrorCode
.
UNKNOWN
);
throw
new
ClientRequestException
(
BrowserErrorCode
.
UNKNOWN
);
}
}
}
}
...
...
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