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
53558656
Commit
53558656
authored
Jul 01, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
售后时间
parent
904eb13d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
15 deletions
+84
-15
RB_Goods_Order_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
+4
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+32
-1
RB_Goods_OrderCommissionRepository.cs
....Repository/Product/RB_Goods_OrderCommissionRepository.cs
+11
-0
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+37
-14
No files found.
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
View file @
53558656
...
...
@@ -89,6 +89,10 @@ namespace Mall.Model.Extend.Product
/// </summary>
public
int
?
IsOrderCommission
{
get
;
set
;
}
/// <summary>
/// 是否可以申请售后 1是 2否
/// </summary>
public
int
?
IsCanApplyForAfterSale
{
get
;
set
;
}
/// <summary>
/// 导出选项
/// </summary>
public
List
<
int
>
ExcelEnumIds
{
get
;
set
;
}
...
...
Mall.Module.Product/OrderModule.cs
View file @
53558656
...
...
@@ -566,6 +566,23 @@ namespace Mall.Module.Product
// }
//}
//是否可以申请售后
var
mallModel
=
mallBaseRepository
.
GetEntity
(
mallBaseId
);
model
.
IsCanApplyForAfterSale
=
2
;
if
(
model
.
OrderStatus
==
OrderStatusEnum
.
WaitReceiving
)
{
model
.
IsCanApplyForAfterSale
=
1
;
}
else
if
(
model
.
OrderStatus
==
OrderStatusEnum
.
Received
||
model
.
OrderStatus
==
OrderStatusEnum
.
Completed
)
{
if
(
mallModel
!=
null
&&
mallModel
.
AfterTime
>
0
&&
model
.
ReceivingTime
.
HasValue
)
{
if
(
model
.
ReceivingTime
.
Value
.
AddDays
(
mallModel
.
AfterTime
)
>
DateTime
.
Now
)
{
model
.
IsCanApplyForAfterSale
=
1
;
}
}
}
//获取订阅消息
var
miniModel
=
miniProgramRepository
.
GetListRepository
(
new
RB_MiniProgram_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
}).
FirstOrDefault
();
...
...
@@ -618,7 +635,8 @@ namespace Mall.Module.Product
x
.
IsApplyForAfterSale
}),
model
.
IsApplyForCancel
,
model
.
RejectRemark
model
.
RejectRemark
,
model
.
IsCanApplyForAfterSale
});
}
...
...
@@ -4739,6 +4757,19 @@ namespace Mall.Module.Product
return
goods_OrderDetailRepository
.
GetEntity
(
OrderId
).
RefMapperTo
<
RB_Goods_OrderDetail_Extend
>();
}
/// <summary>
/// 获取订单是否已返佣
/// </summary>
/// <param name="OrderDetailId"></param>
/// <returns></returns>
public
bool
GetOrderCommissionIsSend
(
int
OrderDetailId
)
{
var
list
=
goods_OrderCommissionRepository
.
GetOrderHaveCommissionList
(
OrderDetailId
.
ToString
());
if
(
list
.
Any
())
{
return
true
;
}
return
false
;
}
/// <summary>
/// 获取用户信息
/// </summary>
...
...
Mall.Repository/Product/RB_Goods_OrderCommissionRepository.cs
View file @
53558656
...
...
@@ -271,6 +271,17 @@ left join rb_goods_orderaftersale oa on oc.OrderDetailId= oa.OrderDetialId and o
return
Get
<
RB_Goods_OrderCommission_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// 获取已标记提现的佣金列表
/// </summary>
/// <param name="OrderDetailIds"></param>
/// <returns></returns>
public
List
<
RB_Goods_OrderCommission_Extend
>
GetOrderHaveCommissionList
(
string
OrderDetailIds
)
{
string
sql
=
$@"SELECT * FROM rb_goods_ordercommission oc WHERE oc.CommissionState=2 and oc.OrderDetailId in (
{
OrderDetailIds
}
)"
;
return
Get
<
RB_Goods_OrderCommission_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// 获取所有订单已完成 未结算佣金的订单
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
53558656
...
...
@@ -629,21 +629,44 @@ namespace Mall.WebApi.Controllers.MallBase
return
ApiResult
.
ParamIsNull
(
"数量不正确"
);
}
var
detailModel
=
orderModule
.
GetOrderDetailInfo
(
demodel
.
OrderDetialId
??
0
);
var
omodel
=
orderModule
.
GetOrderInfo
(
detailModel
?.
OrderId
??
0
);
if
(
omodel
==
null
)
{
return
ApiResult
.
ParamIsNull
(
"订单不存在"
);
}
if
(
omodel
.
OrderStatus
!=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitReceiving
&&
omodel
.
OrderStatus
!=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
Received
&&
omodel
.
OrderStatus
!=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
Completed
)
{
return
ApiResult
.
ParamIsNull
(
"订单状态不正确"
);
}
//查询售后时间
//var mallbaseModel = orderModule.GetMallBaseInfo(userInfo.TenantId, userInfo.MallBaseId);
//if (mallbaseModel == null) {
// return ApiResult.ParamIsNull("请联系管理员,未查询到配置信息");
//}
//if (mallbaseModel.AfterTime > 0) {
// //获取订单发货时间
// var detailModel = orderModule.GetOrderDetailInfo(demodel.OrderDetialId ?? 0);
// var omodel = orderModule.GetOrderInfo(detailModel?.OrderId ?? 0);
// if (omodel != null && omodel.OrderStatus > Common.Enum.Goods.OrderStatusEnum.WaitReceiving && omodel.ReceivingTime.HasValue) {
// if (omodel.ReceivingTime.Value.AddDays(mallbaseModel.AfterTime) > DateTime.Now) {
// return ApiResult.ParamIsNull("已超过售后期限(" + mallbaseModel.AfterTime + "天),无法申请售后");
// }
// }
//}
var
mallbaseModel
=
orderModule
.
GetMallBaseInfo
(
userInfo
.
TenantId
,
userInfo
.
MallBaseId
);
if
(
mallbaseModel
!=
null
)
{
if
(
mallbaseModel
.
AfterTime
>
0
)
{
//获取订单发货时间
if
(
omodel
!=
null
&&
omodel
.
OrderStatus
>
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitReceiving
&&
omodel
.
ReceivingTime
.
HasValue
)
{
if
(
omodel
.
ReceivingTime
.
Value
.
AddDays
(
mallbaseModel
.
AfterTime
)
<
DateTime
.
Now
)
{
return
ApiResult
.
ParamIsNull
(
"已超过售后期限("
+
mallbaseModel
.
AfterTime
+
"天),无法申请售后"
);
}
else
{
//验证 佣金是否已发放
if
(
orderModule
.
GetOrderCommissionIsSend
(
demodel
.
OrderDetialId
??
0
))
{
return
ApiResult
.
ParamIsNull
(
"该订单已返佣,无法申请售后"
);
}
}
}
}
else
{
if
(
omodel
.
OrderStatus
!=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitReceiving
)
{
return
ApiResult
.
ParamIsNull
(
"订单状态不正确"
);
}
}
}
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
...
...
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