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
97f5affd
Commit
97f5affd
authored
Sep 08, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
司导订单客人取消
parent
70693ca3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
5 deletions
+35
-5
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+23
-0
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+12
-5
No files found.
Mall.Module.Product/OrderModule.cs
View file @
97f5affd
...
...
@@ -11109,6 +11109,29 @@ namespace Mall.Module.Product
}
return
flag
;
}
/// <summary>
/// 验证司导订单是否可以取消
/// </summary>
/// <param name="orderModel"></param>
/// <returns></returns>
public
string
ValidateSDOrderCanCancel
(
RB_Goods_Order_Extend
orderModel
)
{
var
gbmodel
=
guideCar_BaseRepository
.
GetList
(
new
Model
.
Extend
.
GuideCar
.
RB_GuideCar_Base_Extend
()
{
TenantId
=
orderModel
.
TenantId
,
MallBaseId
=
orderModel
.
MallBaseId
}).
FirstOrDefault
();
if
(
gbmodel
==
null
||
gbmodel
.
CancelHour
<=
0
)
{
return
""
;
}
var
detailList
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
OrderId
=
orderModel
.
OrderId
});
foreach
(
var
item
in
detailList
)
{
if
(
Convert
.
ToDateTime
(
item
.
TripSTime
.
Value
.
ToString
(
"yyyy-MM-dd"
)).
AddHours
(-
gbmodel
.
CancelHour
)
>
DateTime
.
Now
)
{
return
"订单取消超时,需出发日提前"
+
gbmodel
.
CancelHour
+
"小时"
;
}
}
return
""
;
}
#
endregion
#
region
订单评论
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
97f5affd
...
...
@@ -653,11 +653,18 @@ namespace Mall.WebApi.Controllers.MallBase
{
return
ApiResult
.
ParamIsNull
();
}
//if (Type == 2) {
// if (string.IsNullOrEmpty(Remark)) {
// return ApiResult.ParamIsNull("请输入取消申请备注");
// }
//}
var
omodel
=
orderModule
.
GetOrderInfo
(
OrderId
);
if
(
omodel
==
null
)
{
return
ApiResult
.
Failed
(
"订单不存在"
);
}
if
(
omodel
.
OrderClassify
==
1
)
{
//验证可提前取消时间
string
msg
=
orderModule
.
ValidateSDOrderCanCancel
(
omodel
);
if
(
msg
!=
""
)
{
return
ApiResult
.
Failed
(
msg
);
}
}
if
(
string
.
IsNullOrEmpty
(
Remark
))
{
Remark
=
"无"
;
...
...
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