From 7ce75a1354ee398c022a198d4a7e2bd825e23b01 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 17:54:48 +0800 Subject: [PATCH] 1 --- business/partner/purchase/tao_vegetable/tao.go | 11 +---------- controllers/taobao_vegetable.go | 14 +++++++------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/business/partner/purchase/tao_vegetable/tao.go b/business/partner/purchase/tao_vegetable/tao.go index b1970e1c5..4252ad6b5 100644 --- a/business/partner/purchase/tao_vegetable/tao.go +++ b/business/partner/purchase/tao_vegetable/tao.go @@ -213,15 +213,6 @@ func getAPI(appOrgCode string, storeID int, vendorStoreID string) (apiObj *tao_v if appOrgCode == "" { globals.SugarLogger.Debugf("getAPI appOrgCode is empty") } - //apiObj = partner.CurAPIManager.GetAPI(model.VendorIDTaoVegetable, appOrgCode).(*tao_vegetable.API) - //var storeDetail *dao.StoreDetail - //if storeID != model.NO { - // storeDetail, _ = dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDTaoVegetable, appOrgCode) - //} else if vendorStoreID != "" { - // storeDetail, _ = dao.GetStoreDetailByVendorStoreID(dao.GetDB(), vendorStoreID, model.VendorIDTaoVegetable, appOrgCode) - //} - //if storeDetail != nil { - // apiObj.SetToken(storeDetail.MtwmToken) - //} + apiObj = partner.CurAPIManager.GetAPI(model.VendorIDTaoVegetable, appOrgCode).(*tao_vegetable.API) return apiObj } diff --git a/controllers/taobao_vegetable.go b/controllers/taobao_vegetable.go index 17570c62d..4c6c20428 100644 --- a/controllers/taobao_vegetable.go +++ b/controllers/taobao_vegetable.go @@ -80,7 +80,7 @@ func (c *TaoBaoVegetableController) OrderStatus() { // 获取url参数 values, err := url.ParseQuery(urlParam) - globals.SugarLogger.Debugf("ReaderOrderInfo := %s", utils.Format4Output(values, false)) + globals.SugarLogger.Debugf("ReaderOrderInfo := %s", utils.Format4Output(urlParam, false)) globals.SugarLogger.Debugf("ReaderOrderInfo err := %s", utils.Format4Output(err, false)) if err != nil { c.Data["json"] = tao_vegetable.CallBackResultInfo(err) @@ -104,11 +104,11 @@ func (c *TaoBaoVegetableController) OrderStatus() { c.Data["json"] = tao_vegetable.CallBackResultSign(fmt.Errorf("非法签名")) c.ServeJSON() return - } /*else { + } else { c.Data["json"] = tao_vegetable.CallBackResultSign(nil) c.ServeJSON() return - }*/ + } callbackResponse := taoVegetable.OnCallbackMsg(tao_vegetable.OrderStatusChange, utils.Int64ToStr(order.BizOrderId), order) c.Data["json"] = callbackResponse @@ -122,7 +122,7 @@ func (c *TaoBaoVegetableController) ApplyCancelOrder() { // 获取url参数 values, err := url.ParseQuery(urlParam) - globals.SugarLogger.Debugf("ApplyCancelOrder := %s", utils.Format4Output(values, false)) + globals.SugarLogger.Debugf("ApplyCancelOrder := %s", utils.Format4Output(urlParam, false)) globals.SugarLogger.Debugf("ApplyCancelOrder err := %s", utils.Format4Output(err, false)) if err != nil { c.Data["json"] = tao_vegetable.CallBackResultInfo(err) @@ -164,7 +164,7 @@ func (c *TaoBaoVegetableController) UserCancelRefund() { // 获取url参数 values, err := url.ParseQuery(urlParam) - globals.SugarLogger.Debugf("UserCancelRefund := %s", utils.Format4Output(values, false)) + globals.SugarLogger.Debugf("UserCancelRefund := %s", utils.Format4Output(urlParam, false)) globals.SugarLogger.Debugf("UserCancelRefund err := %s", utils.Format4Output(err, false)) if err != nil { c.Data["json"] = tao_vegetable.CallBackResultInfo(err) @@ -206,7 +206,7 @@ func (c *TaoBaoVegetableController) CancelOnSaleRefundOrder() { // 获取url参数 values, err := url.ParseQuery(urlParam) - globals.SugarLogger.Debugf("CancelOnSaleRefundOrder := %s", utils.Format4Output(values, false)) + globals.SugarLogger.Debugf("CancelOnSaleRefundOrder := %s", utils.Format4Output(urlParam, false)) globals.SugarLogger.Debugf("CancelOnSaleRefundOrder err := %s", utils.Format4Output(err, false)) if err != nil { c.Data["json"] = tao_vegetable.CallBackResultInfo(err) @@ -248,7 +248,7 @@ func (c *TaoBaoVegetableController) RefundOrderSuccess() { // 获取url参数 values, err := url.ParseQuery(urlParam) - globals.SugarLogger.Debugf("RefundOrderSuccess := %s", utils.Format4Output(values, false)) + globals.SugarLogger.Debugf("RefundOrderSuccess := %s", utils.Format4Output(urlParam, false)) globals.SugarLogger.Debugf("RefundOrderSuccess err := %s", utils.Format4Output(err, false)) if err != nil { c.Data["json"] = tao_vegetable.CallBackResultInfo(err)