From 13b7b46947b872be45433ac8cb6387ded0a4fa28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 3 Jul 2023 17:30:46 +0800 Subject: [PATCH 1/2] 1 --- business/model/dao/dao_order.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/business/model/dao/dao_order.go b/business/model/dao/dao_order.go index e75d1c176..f33897960 100644 --- a/business/model/dao/dao_order.go +++ b/business/model/dao/dao_order.go @@ -2,6 +2,7 @@ package dao import ( "fmt" + "git.rosy.net.cn/jx-callback/globals" "regexp" "strconv" "time" @@ -1155,6 +1156,8 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat sqlParams = append(sqlParams, pageSize, offset) txDB, _ := Begin(db) defer Commit(db, txDB) + globals.SugarLogger.Debugf("===============sql2 := %s", sql) + globals.SugarLogger.Debugf("===============sql2 := %s", utils.Format4Output(sqlParams, false)) if err = GetRowsTx(txDB, &orders, sql, sqlParams...); err == nil { totalCount = GetLastTotalRowCount2(db, txDB) } From 24e26bc8e833b37efa1cc5748bace620302b4458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 3 Jul 2023 17:46:21 +0800 Subject: [PATCH 2/2] 1 --- business/model/dao/dao_order.go | 2 +- controllers/taobao_vegetable.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/business/model/dao/dao_order.go b/business/model/dao/dao_order.go index f33897960..0dda02257 100644 --- a/business/model/dao/dao_order.go +++ b/business/model/dao/dao_order.go @@ -893,7 +893,7 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat sql := fmt.Sprintf(` SELECT SQL_CALC_FOUND_ROWS a.* FROM ( SELECT - DISTINCT t1.*, + t1.*, -- CAST(IF(t1.earning_price <> 0, t1.earning_price, IF(t1.shop_price <> 0 && t1.shop_price < t1.sale_price, t1.shop_price, t1.sale_price) * IF(t1.order_pay_percentage > 0, t1.order_pay_percentage, %d) / 100) AS SIGNED) earning_price, t2.status waybill_status, t2.courier_name, t2.courier_mobile, t2.actual_fee, t2.desired_fee,t2.punctual_fee, t2.waybill_created_at, t2.waybill_finished_at, t2.vendor_waybill_id2 vendor_waybill_id2_waybill, diff --git a/controllers/taobao_vegetable.go b/controllers/taobao_vegetable.go index e5bf541b0..dcdc76b33 100644 --- a/controllers/taobao_vegetable.go +++ b/controllers/taobao_vegetable.go @@ -146,11 +146,11 @@ func (c *TaoBaoVegetableController) ApplyCancelOrder() { 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.OrderStatusApplyAfs, afsOrder.OutOrderId, afsOrder) c.Data["json"] = callbackResponse