mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:43:26 +08:00
【优化】优化后台取消并退款功能,增加完成后的分销或者代理商订单作废。
This commit is contained in:
@@ -68,6 +68,9 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
private readonly CoreCms.Net.WeChat.Service.HttpClients.IWeChatApiHttpClientFactory _weChatApiHttpClientFactory;
|
||||
private readonly IWeChatShippingDeliveryServices _weChatShippingDeliveryServices;
|
||||
|
||||
private readonly ICoreCmsDistributionOrderServices _distributionOrderServices;
|
||||
private readonly ICoreCmsAgentOrderServices _agentOrderServices;
|
||||
|
||||
|
||||
private readonly ICoreCmsOrderItemServices _orderItemServices;
|
||||
|
||||
@@ -85,7 +88,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
, ICoreCmsLogisticsServices logisticsServices
|
||||
, ICoreCmsBillPaymentsServices billPaymentsServices
|
||||
, ICoreCmsPaymentsServices paymentsServices
|
||||
, ICoreCmsSettingServices settingServices, ICoreCmsUserWeChatInfoServices userWeChatInfoServices, IRedisOperationRepository redisOperationRepository, ICoreCmsBillDeliveryServices billDeliveryServices, IWeChatApiHttpClientFactory weChatApiHttpClientFactory, ICoreCmsOrderItemServices orderItemServices, IWeChatShippingDeliveryServices weChatShippingDeliveryServices)
|
||||
, ICoreCmsSettingServices settingServices, ICoreCmsUserWeChatInfoServices userWeChatInfoServices, IRedisOperationRepository redisOperationRepository, ICoreCmsBillDeliveryServices billDeliveryServices, IWeChatApiHttpClientFactory weChatApiHttpClientFactory, ICoreCmsOrderItemServices orderItemServices, IWeChatShippingDeliveryServices weChatShippingDeliveryServices, ICoreCmsDistributionOrderServices distributionOrderServices, ICoreCmsAgentOrderServices agentOrderServices)
|
||||
{
|
||||
_webHostEnvironment = webHostEnvironment;
|
||||
_coreCmsOrderServices = coreCmsOrderServices;
|
||||
@@ -103,6 +106,8 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
_weChatApiHttpClientFactory = weChatApiHttpClientFactory;
|
||||
_orderItemServices = orderItemServices;
|
||||
_weChatShippingDeliveryServices = weChatShippingDeliveryServices;
|
||||
_distributionOrderServices = distributionOrderServices;
|
||||
_agentOrderServices = agentOrderServices;
|
||||
}
|
||||
|
||||
#region 获取列表============================================================
|
||||
@@ -1736,6 +1741,17 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
}
|
||||
|
||||
var result = await _coreCmsOrderServices.CancelOrderAndRefund(entity.id);
|
||||
|
||||
//退款成功,还要去注销分销或者代理订单的状态取消。
|
||||
if (result.status)
|
||||
{
|
||||
//作废分销订单
|
||||
await _distributionOrderServices.CancleOrderByOrderId(entity.id);
|
||||
//作废代理订单
|
||||
await _agentOrderServices.CancelOrderByOrderId(entity.id);
|
||||
|
||||
}
|
||||
|
||||
jm.code = result.status ? 0 : 1;
|
||||
jm.msg = result.msg;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user