This commit is contained in:
邹宗楠
2024-02-04 09:43:48 +08:00
parent 913ba27fd3
commit f7c0605e00

View File

@@ -231,19 +231,16 @@ func (c *TaoBaoVegetableController) CancelOnSaleRefundOrder() {
return return
} }
if order.Status < model.OrderStatusDelivering || order.Status == model.OrderStatusCanceled { if order.Status == model.OrderStatusCanceled {
if order.Status == model.OrderStatusCanceled { c.Data["json"] = tao_vegetable.CallBackResultOnSaleCancel(nil)
c.Data["json"] = tao_vegetable.CallBackResultOnSaleCancel(nil) c.ServeJSON()
c.ServeJSON() }
} if order.Status >= model.OrderStatusDelivering {
c.Data["json"] = tao_vegetable.CallBackResultOnSaleCancel(fmt.Errorf("不支持售中取消"))
if order.Status >= model.OrderStatusDelivering { c.ServeJSON()
c.Data["json"] = tao_vegetable.CallBackResultOnSaleCancel(fmt.Errorf("不支持售中取消")) } else {
c.ServeJSON() c.Data["json"] = tao_vegetable.CallBackResultOnSaleCancel(nil)
} else { c.ServeJSON()
c.Data["json"] = tao_vegetable.CallBackResultOnSaleCancel(nil)
c.ServeJSON()
}
} }
} }
} }