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
b4299caf
Commit
b4299caf
authored
Aug 28, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时器提交
parent
9e0ee2f6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
56 deletions
+97
-56
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+23
-14
RB_Goods_OrderAfterSaleRepository.cs
Mall.Repository/Product/RB_Goods_OrderAfterSaleRepository.cs
+4
-2
FinanceModule.cs
Mall.WindowsService/Module/FinanceModule.cs
+70
-40
No files found.
Mall.Module.Product/OrderModule.cs
View file @
b4299caf
...
...
@@ -760,7 +760,7 @@ namespace Mall.Module.Product
if
(
dlist
.
Any
())
{
string
orderDetailIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
Id
));
var
oasList
=
goods_OrderAfterSaleRepository
.
GetList
(
new
RB_Goods_OrderAfterSale_Extend
()
{
OrderDetailIds
=
orderDetailIds
,
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
});
var
oasList
=
goods_OrderAfterSaleRepository
.
GetList
(
new
RB_Goods_OrderAfterSale_Extend
()
{
OrderDetailIds
=
orderDetailIds
,
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
}
,
false
);
foreach
(
var
item
in
dlist
)
{
item
.
CoverImagePath
=
item
.
CoverImage
;
...
...
@@ -5485,7 +5485,7 @@ namespace Mall.Module.Product
int
Rstr
=
R
.
Next
(
111
,
999
);
demodel
.
ReOrderNo
=
"RE"
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
)
+
Rstr
;
var
oasList
=
goods_OrderAfterSaleRepository
.
GetList
(
new
RB_Goods_OrderAfterSale_Extend
()
{
OrderDetialId
=
demodel
.
OrderDetialId
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
var
oasList
=
goods_OrderAfterSaleRepository
.
GetList
(
new
RB_Goods_OrderAfterSale_Extend
()
{
OrderDetialId
=
demodel
.
OrderDetialId
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
}
,
false
);
if
(
oasList
.
Any
())
{
return
false
;
...
...
@@ -8467,9 +8467,13 @@ namespace Mall.Module.Product
//总佣金
decimal
TotalCommission
=
0
,
OldCommission
=
0
;
foreach
(
var
item
in
ssList
.
Where
(
x
=>
x
.
CommissionState
==
1
))
{
var
afterSaleList
=
goods_OrderAfterSaleRepository
.
GetList
(
new
RB_Goods_OrderAfterSale_Extend
()
{
OrderDetialId
=
item
.
OrderDetailId
,
Type
=
1
,
MallBaseId
=
mallBaseId
,
TenantId
=
tenantId
});
if
(!
afterSaleList
.
Any
())
{
TotalCommission
+=
(
item
.
Commission
??
0
);
}
}
#
region
看微店佣金是否是负数
是的话
需要走总佣金里减去
OldCommission
=
TotalCommission
;
if
((
smallModel
.
Commission
??
0
)
<
0
)
...
...
@@ -8638,6 +8642,10 @@ namespace Mall.Module.Product
//获取微店信息
var
smallModel
=
smallShops_InfoRepository
.
GetList
(
new
RB_SmallShops_Info_Extend
()
{
UserId
=
ssmodel
.
UserId
,
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
}).
FirstOrDefault
();
foreach
(
var
item
in
ssList
.
Where
(
x
=>
x
.
CommissionState
==
1
))
{
//查询是否有申请退款
var
afterSaleList
=
goods_OrderAfterSaleRepository
.
GetList
(
new
RB_Goods_OrderAfterSale_Extend
()
{
OrderDetialId
=
item
.
OrderDetailId
,
Type
=
1
,
MallBaseId
=
mallBaseId
,
TenantId
=
tenantId
});
if
(!
afterSaleList
.
Any
())
{
if
(
smallModel
!=
null
&&
smallModel
.
AuditStatus
==
DistributorAuditStatusEnum
.
Audited
)
{
...
...
@@ -8675,6 +8683,7 @@ namespace Mall.Module.Product
}
}
}
}
//积分赠送
var
dlist
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
OrderId
=
orderModel
.
OrderId
,
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
});
if
(
dlist
.
Any
())
...
...
Mall.Repository/Product/RB_Goods_OrderAfterSaleRepository.cs
View file @
b4299caf
...
...
@@ -151,10 +151,12 @@ INNER JOIN rb_member_user mu on mu.Id=oas.UserId
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_OrderAfterSale_Extend
>
GetList
(
RB_Goods_OrderAfterSale_Extend
dmodel
)
public
List
<
RB_Goods_OrderAfterSale_Extend
>
GetList
(
RB_Goods_OrderAfterSale_Extend
dmodel
,
bool
IsNormal
=
true
)
{
string
where
=
$" where 1=1 and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
Status
)}
=0"
;
if
(
IsNormal
)
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
ReOrderStatus
)}
<>
{(
int
)
Common
.
Enum
.
Goods
.
OrderAfterSaleStatusEnum
.
Rejected
}
"
;
}
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
...
...
Mall.WindowsService/Module/FinanceModule.cs
View file @
b4299caf
...
...
@@ -871,9 +871,14 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
//总佣金
decimal
TotalCommission
=
0
,
OldCommission
=
0
;
foreach
(
var
item
in
ssList
.
Where
(
x
=>
x
.
CommissionState
==
1
))
{
//查询是否有申请退款
var
afterSaleList
=
goods_OrderAfterSaleRepository
.
GetList
(
new
RB_Goods_OrderAfterSale_Extend
()
{
OrderDetialId
=
item
.
OrderDetailId
,
Type
=
1
,
MallBaseId
=
mallBaseId
,
TenantId
=
tenantId
});
if
(!
afterSaleList
.
Any
())
{
TotalCommission
+=
(
item
.
Commission
??
0
);
}
}
#
region
看微店佣金是否是负数
是的话
需要走总佣金里减去
OldCommission
=
TotalCommission
;
if
((
smallModel
.
Commission
??
0
)
<
0
)
...
...
@@ -1042,6 +1047,10 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
//获取微店信息
var
smallModel
=
smallShops_InfoRepository
.
GetList
(
new
RB_SmallShops_Info_Extend
()
{
UserId
=
ssmodel
.
UserId
,
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
}).
FirstOrDefault
();
foreach
(
var
item
in
ssList
.
Where
(
x
=>
x
.
CommissionState
==
1
))
{
//查询是否有申请退款
var
afterSaleList
=
goods_OrderAfterSaleRepository
.
GetList
(
new
RB_Goods_OrderAfterSale_Extend
()
{
OrderDetialId
=
item
.
OrderDetailId
,
Type
=
1
,
MallBaseId
=
mallBaseId
,
TenantId
=
tenantId
});
if
(!
afterSaleList
.
Any
())
{
if
(
smallModel
!=
null
&&
smallModel
.
AuditStatus
==
DistributorAuditStatusEnum
.
Audited
)
{
...
...
@@ -1079,6 +1088,7 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
}
}
}
}
//积分赠送
var
dlist
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
OrderId
=
orderModel
.
OrderId
,
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
});
if
(
dlist
.
Any
())
...
...
@@ -1464,9 +1474,14 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
//总佣金
decimal
TotalCommission
=
0
,
OldCommission
=
0
;
foreach
(
var
qcitem
in
ssList
.
Where
(
x
=>
x
.
CommissionState
==
1
))
{
//查询是否有申请退款
var
afterSaleList
=
goods_OrderAfterSaleRepository
.
GetList
(
new
RB_Goods_OrderAfterSale_Extend
()
{
OrderDetialId
=
qcitem
.
OrderDetailId
,
Type
=
1
,
MallBaseId
=
item
.
MallBaseId
,
TenantId
=
item
.
TenantId
});
if
(!
afterSaleList
.
Any
())
{
TotalCommission
+=
(
qcitem
.
Commission
??
0
);
}
}
#
region
看微店佣金是否是负数
是的话
需要走总佣金里减去
OldCommission
=
TotalCommission
;
if
((
smallModel
.
Commission
??
0
)
<
0
)
...
...
@@ -1632,6 +1647,10 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
else
{
foreach
(
var
qitem
in
ssList
.
Where
(
x
=>
x
.
CommissionState
==
1
))
{
//查询是否有申请退款
var
afterSaleList
=
goods_OrderAfterSaleRepository
.
GetList
(
new
RB_Goods_OrderAfterSale_Extend
()
{
OrderDetialId
=
qitem
.
OrderDetailId
,
Type
=
1
,
MallBaseId
=
item
.
MallBaseId
,
TenantId
=
item
.
TenantId
});
if
(!
afterSaleList
.
Any
())
{
//获取微店信息
var
smallModel
=
smallShops_InfoRepository
.
GetList
(
new
RB_SmallShops_Info_Extend
()
{
UserId
=
qitem
.
UserId
,
TenantId
=
item
.
TenantId
,
MallBaseId
=
item
.
MallBaseId
}).
FirstOrDefault
();
...
...
@@ -1671,6 +1690,7 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
}
}
}
}
catch
(
Exception
)
{
Helper
.
LogHelper
.
Write
(
"AutoAfterSaleOrderSendCommission:更新微店返佣失败"
);
...
...
@@ -1793,9 +1813,14 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
#
region
看微店佣金是否是负数
是的话
需要走总佣金里减去
OldCommission
=
TotalCommission
;
if
((
smallModel
.
Commission
??
0
)
<
0
)
{
//查询是否有申请退款
var
afterSaleList
=
goods_OrderAfterSaleRepository
.
GetList
(
new
RB_Goods_OrderAfterSale_Extend
()
{
OrderDetialId
=
qitem
.
OrderDetailId
,
Type
=
1
,
MallBaseId
=
item
.
MallBaseId
,
TenantId
=
item
.
TenantId
});
if
(!
afterSaleList
.
Any
())
{
TotalCommission
+=
(
smallModel
?.
Commission
??
0
);
}
}
#
endregion
if
(
TotalCommission
>
0
)
{
...
...
@@ -1955,6 +1980,10 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
else
{
foreach
(
var
qitem
in
ssList
.
Where
(
x
=>
x
.
CommissionState
==
1
))
{
//查询是否有申请退款
var
afterSaleList
=
goods_OrderAfterSaleRepository
.
GetList
(
new
RB_Goods_OrderAfterSale_Extend
()
{
OrderDetialId
=
qitem
.
OrderDetailId
,
Type
=
1
,
MallBaseId
=
item
.
MallBaseId
,
TenantId
=
item
.
TenantId
});
if
(!
afterSaleList
.
Any
())
{
//获取微店信息
var
smallModel
=
smallShops_InfoRepository
.
GetList
(
new
RB_SmallShops_Info_Extend
()
{
UserId
=
qitem
.
UserId
,
TenantId
=
item
.
TenantId
,
MallBaseId
=
item
.
MallBaseId
}).
FirstOrDefault
();
...
...
@@ -1994,6 +2023,7 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
}
}
}
}
catch
(
Exception
)
{
Helper
.
LogHelper
.
Write
(
"AutoAfterSaleOrderSendCommission:更新微店返佣失败"
);
...
...
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