From f7c0605e00db7c6f8f686a7bd1947b1be1fe71d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Sun, 4 Feb 2024 09:43:48 +0800 Subject: [PATCH] 1 --- controllers/taobao_vegetable.go | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/controllers/taobao_vegetable.go b/controllers/taobao_vegetable.go index 809fdf278..07905d1f0 100644 --- a/controllers/taobao_vegetable.go +++ b/controllers/taobao_vegetable.go @@ -231,19 +231,16 @@ func (c *TaoBaoVegetableController) CancelOnSaleRefundOrder() { return } - if order.Status < model.OrderStatusDelivering || order.Status == model.OrderStatusCanceled { - if order.Status == model.OrderStatusCanceled { - c.Data["json"] = tao_vegetable.CallBackResultOnSaleCancel(nil) - c.ServeJSON() - } - - if order.Status >= model.OrderStatusDelivering { - c.Data["json"] = tao_vegetable.CallBackResultOnSaleCancel(fmt.Errorf("不支持售中取消")) - c.ServeJSON() - } else { - c.Data["json"] = tao_vegetable.CallBackResultOnSaleCancel(nil) - c.ServeJSON() - } + if order.Status == model.OrderStatusCanceled { + c.Data["json"] = tao_vegetable.CallBackResultOnSaleCancel(nil) + c.ServeJSON() + } + if order.Status >= model.OrderStatusDelivering { + c.Data["json"] = tao_vegetable.CallBackResultOnSaleCancel(fmt.Errorf("不支持售中取消")) + c.ServeJSON() + } else { + c.Data["json"] = tao_vegetable.CallBackResultOnSaleCancel(nil) + c.ServeJSON() } } }