Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
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
黄奎
mall.oytour.com
Commits
3e3edcaa
Commit
3e3edcaa
authored
Aug 21, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
佣金现结
parent
5adcb40f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
57 deletions
+53
-57
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+35
-36
SmallShopsModule.cs
Mall.Module.User/SmallShopsModule.cs
+18
-21
No files found.
Mall.Module.Product/OrderModule.cs
View file @
3e3edcaa
...
@@ -269,6 +269,10 @@ namespace Mall.Module.Product
...
@@ -269,6 +269,10 @@ namespace Mall.Module.Product
/// </summary>
/// </summary>
private
readonly
RB_SmallShops_CommissionRepository
smallShopsCommissionRepository
=
new
RB_SmallShops_CommissionRepository
();
private
readonly
RB_SmallShops_CommissionRepository
smallShopsCommissionRepository
=
new
RB_SmallShops_CommissionRepository
();
/// <summary>
/// <summary>
/// 微店提现
/// </summary>
private
readonly
RB_SmallShops_RemitRepository
smallShops_RemitRepository
=
new
RB_SmallShops_RemitRepository
();
/// <summary>
/// 微店信息
/// 微店信息
/// </summary>
/// </summary>
private
readonly
RB_SmallShops_InfoRepository
smallShopsInfoRepository
=
new
RB_SmallShops_InfoRepository
();
private
readonly
RB_SmallShops_InfoRepository
smallShopsInfoRepository
=
new
RB_SmallShops_InfoRepository
();
...
@@ -8424,9 +8428,9 @@ namespace Mall.Module.Product
...
@@ -8424,9 +8428,9 @@ namespace Mall.Module.Product
TotalCommission
+=
(
item
.
Commission
??
0
);
TotalCommission
+=
(
item
.
Commission
??
0
);
}
}
#
region
看微店佣金是否是负数
是的话
需要走总佣金里减去
#
region
看微店佣金是否是负数
是的话
需要走总佣金里减去
OldCommission
=
TotalCommission
;
if
((
smallModel
.
Commission
??
0
)
<
0
)
if
((
smallModel
.
Commission
??
0
)
<
0
)
{
{
OldCommission
=
TotalCommission
;
TotalCommission
+=
(
smallModel
?.
Commission
??
0
);
TotalCommission
+=
(
smallModel
?.
Commission
??
0
);
}
}
#
endregion
#
endregion
...
@@ -8475,7 +8479,7 @@ namespace Mall.Module.Product
...
@@ -8475,7 +8479,7 @@ namespace Mall.Module.Product
}
}
}
}
//写入已提现数据
//写入已提现数据
distributor_RemitRepository
.
Insert
(
new
Model
.
Entity
.
User
.
RB_Distributor
_Remit
()
smallShops_RemitRepository
.
Insert
(
new
Model
.
Entity
.
User
.
RB_SmallShops
_Remit
()
{
{
Id
=
0
,
Id
=
0
,
AccountName
=
""
,
AccountName
=
""
,
...
@@ -8495,9 +8499,8 @@ namespace Mall.Module.Product
...
@@ -8495,9 +8499,8 @@ namespace Mall.Module.Product
RemitDate
=
DateTime
.
Now
,
RemitDate
=
DateTime
.
Now
,
RemitMoney
=
RemitMoney
,
RemitMoney
=
RemitMoney
,
RemitRemark
=
"自动结算打款"
,
RemitRemark
=
"自动结算打款"
,
ReOrderIds
=
(
orderModel
.
OrderId
).
ToString
(),
ReOrderIds
=
"["
+
(
orderModel
.
OrderId
).
ToString
()
+
"]"
,
ReOrderNos
=
orderModel
.
OrderNo
,
ReOrderNos
=
"\""
+
orderModel
.
OrderNo
+
"\":"
+
RemitMoney
+
"元"
,
ReVipIds
=
""
,
TenantId
=
tenantId
,
TenantId
=
tenantId
,
UserId
=
ssmodel
.
UserId
,
UserId
=
ssmodel
.
UserId
,
WithdrawalWay
=
DistrbutorWithdrawWayEnum
.
ZDXJ
WithdrawalWay
=
DistrbutorWithdrawWayEnum
.
ZDXJ
...
@@ -8527,14 +8530,14 @@ namespace Mall.Module.Product
...
@@ -8527,14 +8530,14 @@ namespace Mall.Module.Product
}
}
}
}
//写入已提现数据
//写入已提现数据
distributor_RemitRepository
.
Insert
(
new
Model
.
Entity
.
User
.
RB_Distributor
_Remit
()
smallShops_RemitRepository
.
Insert
(
new
Model
.
Entity
.
User
.
RB_SmallShops
_Remit
()
{
{
Id
=
0
,
Id
=
0
,
AccountName
=
""
,
AccountName
=
""
,
AccountNumber
=
""
,
AccountNumber
=
""
,
AppliedMoney
=
TotalCommission
,
AppliedMoney
=
TotalCommission
,
AuditDate
=
DateTime
.
Now
,
AuditDate
=
DateTime
.
Now
,
AuditRemark
=
"自动
结算失败,请
手动打款"
,
AuditRemark
=
"自动
现结失败,变更为
手动打款"
,
AuditStatus
=
DistributorRemitAuditStatusEnum
.
ToPlayWith
,
AuditStatus
=
DistributorRemitAuditStatusEnum
.
ToPlayWith
,
BankName
=
""
,
BankName
=
""
,
CreateDate
=
DateTime
.
Now
,
CreateDate
=
DateTime
.
Now
,
...
@@ -8547,20 +8550,17 @@ namespace Mall.Module.Product
...
@@ -8547,20 +8550,17 @@ namespace Mall.Module.Product
RemitDate
=
DateTime
.
Now
,
RemitDate
=
DateTime
.
Now
,
RemitMoney
=
RemitMoney
,
RemitMoney
=
RemitMoney
,
RemitRemark
=
""
,
RemitRemark
=
""
,
ReOrderIds
=
(
orderModel
.
OrderId
).
ToString
(),
ReOrderIds
=
"["
+
(
orderModel
.
OrderId
).
ToString
()
+
"]"
,
ReOrderNos
=
orderModel
.
OrderNo
,
ReOrderNos
=
"\""
+
orderModel
.
OrderNo
+
"\":"
+
RemitMoney
+
"元"
,
ReVipIds
=
""
,
TenantId
=
tenantId
,
TenantId
=
tenantId
,
UserId
=
ssmodel
.
UserId
,
UserId
=
ssmodel
.
UserId
,
WithdrawalWay
=
DistrbutorWithdrawWayEnum
.
ZDDK
WithdrawalWay
=
DistrbutorWithdrawWayEnum
.
ZDDK
});
});
}
}
if
((
smallModel
.
Commission
??
0
)
<
0
)
{
//更新微店佣金等于0
//更新微店佣金等于0
Dictionary
<
string
,
object
>
keyValues2
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues2
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_SmallShops_Info_Extend
.
TotalCommission
),(
smallModel
.
TotalCommission
??
0
)
+
OldCommission
},
{
nameof
(
RB_SmallShops_Info_Extend
.
TotalCommission
),(
smallModel
.
TotalCommission
??
0
)
+
OldCommission
},
{
nameof
(
RB_SmallShops_Info_Extend
.
Commission
),
0
},
{
nameof
(
RB_SmallShops_Info_Extend
.
Commission
),
TotalCommission
}
};
};
List
<
WhereHelper
>
wheres2
=
new
List
<
WhereHelper
>()
{
List
<
WhereHelper
>
wheres2
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
new
WhereHelper
(){
...
@@ -8571,7 +8571,6 @@ namespace Mall.Module.Product
...
@@ -8571,7 +8571,6 @@ namespace Mall.Module.Product
};
};
bool
flag1
=
smallShops_InfoRepository
.
Update
(
keyValues2
,
wheres2
);
bool
flag1
=
smallShops_InfoRepository
.
Update
(
keyValues2
,
wheres2
);
}
}
}
else
if
(
TotalCommission
<
0
)
else
if
(
TotalCommission
<
0
)
{
{
//存在微店佣金里 继续负数累加
//存在微店佣金里 继续负数累加
...
...
Mall.Module.User/SmallShopsModule.cs
View file @
3e3edcaa
...
@@ -413,8 +413,6 @@ namespace Mall.Module.User
...
@@ -413,8 +413,6 @@ namespace Mall.Module.User
//开始递减金额 订单不足的 给与提示
//开始递减金额 订单不足的 给与提示
foreach
(
var
item
in
olist
)
foreach
(
var
item
in
olist
)
{
if
(
TMoney
>
0
)
{
{
decimal
CommMoney
=
0
;
decimal
CommMoney
=
0
;
var
chlist
=
clist
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
ToList
();
var
chlist
=
clist
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
ToList
();
...
@@ -437,7 +435,6 @@ namespace Mall.Module.User
...
@@ -437,7 +435,6 @@ namespace Mall.Module.User
OrderNos
+=
"\""
+
item
.
OrderNo
+
"\":"
+
CommMoney
+
"元,"
;
OrderNos
+=
"\""
+
item
.
OrderNo
+
"\":"
+
CommMoney
+
"元,"
;
OrderIdList
.
Add
(
item
.
OrderId
);
OrderIdList
.
Add
(
item
.
OrderId
);
}
}
}
if
(!
string
.
IsNullOrEmpty
(
OrderNos
))
if
(!
string
.
IsNullOrEmpty
(
OrderNos
))
{
{
OrderNos
=
OrderNos
[
0.
.^
1
];
OrderNos
=
OrderNos
[
0.
.^
1
];
...
...
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