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
c0d08e85
Commit
c0d08e85
authored
Jun 28, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
eb815035
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
3 deletions
+59
-3
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+7
-2
RB_Goods_OrderRepository.cs
Mall.Repository/Product/RB_Goods_OrderRepository.cs
+16
-1
FinanceModule.cs
Mall.WindowsService/Module/FinanceModule.cs
+36
-0
No files found.
Mall.Module.Product/OrderModule.cs
View file @
c0d08e85
...
...
@@ -5436,6 +5436,7 @@ namespace Mall.Module.Product
keyValues
.
Add
(
nameof
(
RB_Goods_Order
.
OrderStatus
),
omodel
.
HistoryOrderStatus
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order
.
RejectRemark
),
remark
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order
.
IsApplyForCancel
),
2
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order
.
Refund
),
omodel
.
Income
);
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
...
...
@@ -5659,6 +5660,10 @@ namespace Mall.Module.Product
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
};
keyValues
.
Add
(
nameof
(
RB_Goods_Order
.
OrderStatus
),
OrderStatusEnum
.
Cancel
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order
.
RefundOrderNo
),
RefundOrderNo
);
if
(
omodel
.
OrderStatus
!=
OrderStatusEnum
.
NonPayment
)
{
keyValues
.
Add
(
nameof
(
RB_Goods_Order
.
Refund
),
omodel
.
Income
);
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
...
...
@@ -5878,7 +5883,7 @@ namespace Mall.Module.Product
//先查询规则
var
financeConfigurineList
=
financeConfigurineRepository
.
GetList
(
new
Model
.
Extend
.
Finance
.
RB_Finance_Configurine_Extend
{
Type
=
3
});
string
dstr
=
"客人付款:"
+
(
omodel
.
Income
??
0
)
+
"金额,退款:"
+
(
omodel
.
Refund
??
0
);
string
dstr
=
"客人付款:"
+
(
omodel
.
Income
??
0
)
+
"金额,退款:"
+
(
omodel
.
Income
??
0
);
if
(
financeConfigurineList
!=
null
&&
financeConfigurineList
.
Any
())
{
var
item
=
financeConfigurineList
.
FirstOrDefault
();
...
...
@@ -6225,7 +6230,7 @@ namespace Mall.Module.Product
}
}
else
if
(
type
==
3
)
{
//强制取消
//强制取消
(作废 使用新方法)
}
}
...
...
Mall.Repository/Product/RB_Goods_OrderRepository.cs
View file @
c0d08e85
...
...
@@ -471,7 +471,22 @@ GROUP BY o.OrderId)t";
return
Get
<
RB_Goods_Order_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// 获取所有订单已完成 未结算佣金的订单
/// </summary>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
List
<
RB_Goods_Order_Extend
>
GetAllOrderCompletedNoCommission
(
int
tenantId
,
int
mallBaseId
)
{
string
sql
=
$@"SELECT oc.OrderId FROM rb_goods_ordercommission oc
INNER JOIN rb_goods_orderdetail od on oc.OrderDetailId = od.Id
INNER JOIN rb_goods_order o on oc.OrderId = o.OrderId
left join rb_goods_orderaftersale oa on oc.OrderDetailId= oa.OrderDetialId and oa.Type=1 and oa.Status=0 and oa.ReOrderStatus in (2,3,4,5)
where oc.TenantId=1 and oc.MallBaseId=1 and oc.CommissionState =1 and o.OrderStatus =5 and o.Recycled=2 and oa.ReOrderId is null
GROUP BY oc.OrderId"
;
return
Get
<
RB_Goods_Order_Extend
>(
sql
).
ToList
();
}
#
region
数据统计
-
数据概况
/// <summary>
...
...
Mall.WindowsService/Module/FinanceModule.cs
View file @
c0d08e85
...
...
@@ -533,6 +533,42 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an
#
endregion
#
region
售后时间到了发放佣金
/// <summary>
/// 售后时间到了发放佣金
/// </summary>
/// <returns></returns>
public
static
bool
AutoAfterSaleOrderSendCommission
()
{
try
{
var
list
=
mallBaseRepository
.
GetListRepository
(
new
Mall
.
Model
.
Extend
.
BaseSetUp
.
RB_MallBase_Extend
()
{
});
foreach
(
var
item
in
list
)
{
//查询该商户下 所有已完成 未发放佣金的单子
var
CommList
=
goods_OrderRepository
.
GetAllOrderCompletedNoCommission
(
item
.
TenantId
,
item
.
MallBaseId
);
if
(
item
.
AfterTime
>
0
)
{
//判断是否到了时间
}
else
{
//直接结算佣金
}
}
return
true
;
}
catch
(
Exception
ex
)
{
Helper
.
LogHelper
.
Write
(
"AutoCancelOrder:"
+
ex
.
Message
);
return
false
;
}
}
#
endregion
#
region
七天自动是否下线
public
static
bool
AutoReleaseTheOffline
()
...
...
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