Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
80ec3ed7
Commit
80ec3ed7
authored
Jul 17, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
计算介绍佣金3
parent
2b2015f0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/UserBillServiceImpl.java
...com/wwdz/ch/wx/impl/distribution/UserBillServiceImpl.java
+4
-9
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/UserBillServiceImpl.java
View file @
80ec3ed7
...
@@ -108,7 +108,7 @@ public class UserBillServiceImpl implements UserBillService {
...
@@ -108,7 +108,7 @@ public class UserBillServiceImpl implements UserBillService {
//计算介绍人的佣金(介绍人非卖家自己和平台)
//计算介绍人的佣金(介绍人非卖家自己和平台)
if
(!
distributionOrder
.
getShareRecordId
().
equals
(
distributionOrder
.
getSellerId
().
toString
())
if
(!
distributionOrder
.
getShareRecordId
().
equals
(
distributionOrder
.
getSellerId
().
toString
())
&&
distributionOrder
.
getSellerId
().
longValue
()
!=
CommConsts
.
SYSTEM_ACCOUNT
)
{
&&
distributionOrder
.
getSellerId
().
longValue
()
!=
CommConsts
.
SYSTEM_ACCOUNT
)
{
calculateIntroduceAmount
(
distributionOrder
.
getDistributionOrderId
()
,
accountPeriod
);
calculateIntroduceAmount
(
distributionOrder
,
distributorProfit
,
accountPeriod
);
}
}
return
Result
.
success
();
return
Result
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -126,14 +126,9 @@ public class UserBillServiceImpl implements UserBillService {
...
@@ -126,14 +126,9 @@ public class UserBillServiceImpl implements UserBillService {
/**
/**
* 计算介绍佣金
* 计算介绍佣金
*/
*/
private
void
calculateIntroduceAmount
(
String
distributionOrderId
,
String
accountPeriod
)
{
private
void
calculateIntroduceAmount
(
DistributionOrder
distributionOrder
,
DistributorProfit
distributorProfit
,
String
accountPeriod
)
{
UserAccountDetail
userAccountDetail
=
userAccountDetailDao
.
find
(
distributionOrderId
,
BillEnum
.
AccountDetailTypeEnum
.
INTRODUCE
.
getCode
());
long
userId
=
Long
.
valueOf
(
distributionOrder
.
getShareRecordId
());
if
(
userAccountDetail
==
null
)
{
long
amount
=
distributorProfit
.
getIntroduceCost
();
logger
.
error
(
"********** 交易id:{}, 查询不到佣金记录 **********"
,
distributionOrderId
);
return
;
}
long
userId
=
userAccountDetail
.
getUserId
();
long
amount
=
userAccountDetail
.
getAmount
();
//查询介绍人是否有账单
//查询介绍人是否有账单
UserBill
userBill
=
userBillDao
.
findOne
(
accountPeriod
,
userId
,
BillEnum
.
BillStateEnum
.
NOT_PAID
.
getCode
());
UserBill
userBill
=
userBillDao
.
findOne
(
accountPeriod
,
userId
,
BillEnum
.
BillStateEnum
.
NOT_PAID
.
getCode
());
if
(
userBill
==
null
)
{
if
(
userBill
==
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