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
23ec16d8
Commit
23ec16d8
authored
Dec 16, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
7889007a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
50 deletions
+50
-50
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+50
-50
No files found.
Edu.Module.Course/OrderModule.cs
View file @
23ec16d8
...
...
@@ -2854,56 +2854,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
);
}
}
}
//
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
;
}
...
...
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