mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:13:26 +08:00
【优化】优化后台【取消并退款】操作的提示信息及判断。
This commit is contained in:
@@ -1655,15 +1655,15 @@ namespace CoreCms.Net.Services
|
||||
//获取订单并确认是否属于已支付并未发货的订单
|
||||
var where = PredicateBuilder.True<CoreCmsOrder>();
|
||||
where = where.And(p => p.orderId == orderId);
|
||||
where = where.And(p => p.payStatus == (int)GlobalEnumVars.OrderPayStatus.Yes);
|
||||
where = where.And(p => p.status == (int)GlobalEnumVars.OrderStatus.Normal);
|
||||
where = where.And(p => p.shipStatus == (int)GlobalEnumVars.OrderShipStatus.No);
|
||||
//where = where.And(p => p.payStatus == (int)GlobalEnumVars.OrderPayStatus.PartialNo);
|
||||
//where = where.And(p => p.status == (int)GlobalEnumVars.OrderStatus.Normal);
|
||||
//where = where.And(p => p.shipStatus == (int)GlobalEnumVars.OrderShipStatus.No);
|
||||
|
||||
var orderInfo = await _dal.QueryByClauseAsync(where);
|
||||
if (orderInfo == null)
|
||||
{
|
||||
jm.status = false;
|
||||
jm.msg = "不满足条件,必须是已支付未发货订单。";
|
||||
jm.msg = "不满足条件,订单获取失败。";
|
||||
return jm;
|
||||
}
|
||||
|
||||
@@ -1676,6 +1676,25 @@ namespace CoreCms.Net.Services
|
||||
return jm;
|
||||
}
|
||||
|
||||
if (orderInfo.status!= (int)GlobalEnumVars.OrderStatus.Normal)
|
||||
{
|
||||
jm.status = false;
|
||||
jm.msg = "不满足条件,订单必须是进行中状态。";
|
||||
return jm;
|
||||
}
|
||||
if (orderInfo.shipStatus != (int)GlobalEnumVars.OrderShipStatus.No)
|
||||
{
|
||||
jm.status = false;
|
||||
jm.msg = "不满足条件,订单必须是未发货状态。";
|
||||
return jm;
|
||||
}
|
||||
if (orderInfo.payStatus != (int)GlobalEnumVars.OrderPayStatus.Yes)
|
||||
{
|
||||
jm.status = false;
|
||||
jm.msg = "不满足条件,订单必须是已付款状态。";
|
||||
return jm;
|
||||
}
|
||||
|
||||
orderInfo.items = await _orderItemServices.QueryListByClauseAsync(p => p.orderId == orderInfo.orderId);
|
||||
AfterSalesVal(orderInfo, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user