Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
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
黄奎
Education
Commits
cbd4171f
Commit
cbd4171f
authored
Dec 16, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
246aa61a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
0 deletions
+54
-0
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+50
-0
RB_Customer_BalanceDetailRepository.cs
...epository/Customer/RB_Customer_BalanceDetailRepository.cs
+4
-0
No files found.
Edu.Module.Course/OrderModule.cs
View file @
cbd4171f
...
...
@@ -2883,6 +2883,56 @@ namespace Edu.Module.Course
School_Id
=
empModel
.
School_Id
,
SourceId
=
orderId
});
if
(
orderModel
.
CommissionReType
==
2
&&
orderModel
.
CustomerId
>
0
)
{
//订单帐平之后 返佣
var
newOrderModel
=
orderRepository
.
GetEntity
(
orderId
);
if
(
newOrderModel
.
PreferPrice
==
(
newOrderModel
.
Income
-
newOrderModel
.
Refund
+
newOrderModel
.
PlatformTax
+
newOrderModel
.
DiscountMoney
))
{
//帐平了
var
customerModel
=
customerRepository
.
GetEntity
(
orderModel
.
CustomerId
);
//获取订单的返佣列表
var
list
=
customer_BalanceDetailRepository
.
GetCustomerBalanceDetailListRepository
(
new
RB_Customer_BalanceDetail_ViewModel
()
{
Group_Id
=
newOrderModel
.
Group_Id
,
OrderId
=
newOrderModel
.
OrderId
,
BalanceType
=
1
,
BalanceState
=
2
});
if
(
list
.
Any
())
{
Dictionary
<
string
,
object
>
keyValues2
=
new
Dictionary
<
string
,
object
>()
{
};
foreach
(
var
item
in
list
)
{
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Customer_BalanceDetail_ViewModel
.
GiveOutMoney
),
item
.
Money
},
{
nameof
(
RB_Customer_BalanceDetail_ViewModel
.
BalanceState
),
1
}
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Customer_BalanceDetail_ViewModel
.
Id
),
FiledValue
=
item
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
f
=
customer_BalanceDetailRepository
.
Update
(
keyValues1
,
wheres1
);
if
(
f
)
{
if
(
item
.
RebateType
==
1
)
{
keyValues2
.
Add
(
nameof
(
RB_Customer_Extend
.
TotalCommission
),
customerModel
.
TotalCommission
+
item
.
Money
);
keyValues2
.
Add
(
nameof
(
RB_Customer_Extend
.
CommissionWithdrawal
),
customerModel
.
CommissionWithdrawal
+
item
.
Money
);
}
else
if
(
item
.
RebateType
==
2
)
{
keyValues2
.
Add
(
nameof
(
RB_Customer_Extend
.
Client_Balance
),
customerModel
.
Client_Balance
+
item
.
Money
);
}
}
}
//更新同行的可提现金额
List
<
WhereHelper
>
wheres2
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Customer_Extend
.
CustomerId
),
FiledValue
=
customerModel
.
CustomerId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
customerRepository
.
Update
(
keyValues2
,
wheres2
);
}
}
}
}
return
flag
;
}
...
...
Edu.Repository/Customer/RB_Customer_BalanceDetailRepository.cs
View file @
cbd4171f
...
...
@@ -102,6 +102,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Customer_BalanceDetail_ViewModel
.
OrderId
),
query
.
OrderId
);
}
if
(
query
.
BalanceState
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Customer_BalanceDetail_ViewModel
.
BalanceState
),
query
.
BalanceState
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Description
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @Description "
,
nameof
(
RB_Customer_BalanceDetail_ViewModel
.
Description
));
...
...
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