From 0c7d1e515da6887198dfada68053c823298c3d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 29 Jun 2023 10:34:07 +0800 Subject: [PATCH] 1 --- controllers/taobao_vegetable.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/controllers/taobao_vegetable.go b/controllers/taobao_vegetable.go index b7e970799..ee6255327 100644 --- a/controllers/taobao_vegetable.go +++ b/controllers/taobao_vegetable.go @@ -100,7 +100,7 @@ func (c *TaoBaoVegetableController) OrderStatus() { // 验签 sign := Sign(values, utils.Format4Output(order, false), api.TaoVegetableApi.GetAppSecret()) - if sign != values.Get("sign") && order != nil { + if sign != values.Get("sign") { c.Data["json"] = tao_vegetable.CallBackResultSign(fmt.Errorf("非法签名")) c.ServeJSON() return @@ -143,7 +143,7 @@ func (c *TaoBaoVegetableController) ApplyCancelOrder() { // 验签 sign := Sign(values, utils.Format4Output(afsOrder, false), api.TaoVegetableApi.GetAppSecret()) - if sign != values.Get("sign") && afsOrder != nil { + if sign != values.Get("sign") { c.Data["json"] = tao_vegetable.CallBackResultSign(fmt.Errorf("非法签名")) c.ServeJSON() return @@ -186,7 +186,7 @@ func (c *TaoBaoVegetableController) UserCancelRefund() { // 验签 sign := Sign(values, utils.Format4Output(afsOrder, false), api.TaoVegetableApi.GetAppSecret()) - if sign != values.Get("sign") && afsOrder != nil { + if sign != values.Get("sign") { c.Data["json"] = tao_vegetable.CallBackResultSign(fmt.Errorf("非法签名")) c.ServeJSON() return @@ -229,7 +229,7 @@ func (c *TaoBaoVegetableController) CancelOnSaleRefundOrder() { // 验签 sign := Sign(values, utils.Format4Output(afsOrder, false), api.TaoVegetableApi.GetAppSecret()) - if sign != values.Get("sign") && afsOrder != nil { + if sign != values.Get("sign") { c.Data["json"] = tao_vegetable.CallBackResultSign(fmt.Errorf("非法签名")) c.ServeJSON() return @@ -271,7 +271,7 @@ func (c *TaoBaoVegetableController) RefundOrderSuccess() { } // 验签 sign := Sign(values, utils.Format4Output(refundSuccess, false), api.TaoVegetableApi.GetAppSecret()) - if sign != values.Get("sign") && refundSuccess != nil { + if sign != values.Get("sign") { c.Data["json"] = tao_vegetable.CallBackResultSign(fmt.Errorf("非法签名")) c.ServeJSON() return