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
b974a331
Commit
b974a331
authored
Apr 14, 2020
by
renjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-zrj' into 'staging'
推广礼金bug See merge request
!6
parents
68a2d3c0
840e792f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
PaymentServiceImpl.java
...owserbackend/account/service/impl/PaymentServiceImpl.java
+12
-4
No files found.
src/main/java/com/edgec/browserbackend/account/service/impl/PaymentServiceImpl.java
View file @
b974a331
...
...
@@ -209,8 +209,8 @@ public class PaymentServiceImpl implements PaymentService {
if
(
byName
.
getPromotionCode
()
!=
null
)
{
Account
account
=
accountRepository
.
findByPromotion
(
byName
.
getPromotionCode
());
if
(
account
!=
null
)
{
byName
.
getPromotion
().
setCommission
(
byName
.
getPromotion
().
getCommission
()
+
byTradeNo
.
getAmount
());
accountRepository
.
save
(
byName
);
account
.
getPromotion
().
setCommission
(
account
.
getPromotion
().
getCommission
()
+
byTradeNo
.
getAmount
());
accountRepository
.
save
(
account
);
}
}
...
...
@@ -341,8 +341,8 @@ public class PaymentServiceImpl implements PaymentService {
if
(
byName
.
getPromotionCode
()
!=
null
)
{
Account
account
=
accountRepository
.
findByPromotion
(
byName
.
getPromotionCode
());
if
(
account
!=
null
)
{
byName
.
getPromotion
().
setCommission
(
byName
.
getPromotion
().
getCommission
()
+
byTradeNo
.
getAmount
());
accountRepository
.
save
(
byName
);
account
.
getPromotion
().
setCommission
(
account
.
getPromotion
().
getCommission
()
+
byTradeNo
.
getAmount
());
accountRepository
.
save
(
account
);
}
}
}
...
...
@@ -518,6 +518,14 @@ public class PaymentServiceImpl implements PaymentService {
userBalanceRepository
.
incrementBalance
(
userBalance
,
amount
,
0
);
}
if
(
account
.
getPromotionCode
()
!=
null
)
{
Account
account1
=
accountRepository
.
findByPromotion
(
account
.
getPromotionCode
());
if
(
account1
!=
null
)
{
account1
.
getPromotion
().
setCommission
(
account1
.
getPromotion
().
getCommission
()
+
amount
);
accountRepository
.
save
(
account1
);
}
}
return
userBalanceRepository
.
findById
(
username
).
orElse
(
null
);
}
...
...
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