From f8670a582013364d14cf5fc67761c25698662cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B9=B3=E5=87=A1=E6=A2=A6?= Date: Wed, 8 Jul 2020 17:05:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3minimumPrice\highestPrice?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index eac0e6f9a..7b35c9acc 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -464,6 +464,8 @@ func getGetStoresSkusBaseSQL(db *dao.DaoDB, storeIDs, skuIDs []int, isFocus bool sql += " AND t4.unit_price >= ? " sqlParams = append(sqlParams, params["minimumPrice"]) } + globals.SugarLogger.Debug("params的值打印位置4") + globals.SugarLogger.Debug(sql) return sql, sqlParams, err } @@ -472,8 +474,6 @@ func GetStoresSkus(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus, isHi } func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus, isHighPrice bool, priceType int, keyword string, isBySku, isAct bool, params map[string]interface{}, offset, pageSize int) (skuNamesInfo *dao.StoreSkuNamesInfo, err error) { - globals.SugarLogger.Debug("params的值打印位置") - globals.SugarLogger.Debug(params) if !isFocus && !isBySku && (len(storeIDs) > 1 || len(storeIDs) == 0) { return nil, fmt.Errorf("未关注按SkuName只能查询单店") } @@ -484,6 +484,8 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus, i if params["actVendorID"] != nil { actVendorID = int(utils.Interface2Int64WithDefault(params["actVendorID"], -1)) } + globals.SugarLogger.Debug("params的值打印位置") + globals.SugarLogger.Debug(params) var highestPrice, minimumPrice float64 if params["highestPrice"] != nil { if _, ok := params["highestPrice"].(float64); !ok { @@ -492,6 +494,8 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus, i highestPrice = params["highestPrice"].(float64) } } + globals.SugarLogger.Debug("params的值打印位置1") + globals.SugarLogger.Debug(params) if params["minimumPrice"] != nil { if _, ok := params["minimumPrice"].(float64); !ok { delete(params, "minimumPrice") @@ -499,12 +503,16 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus, i minimumPrice = params["minimumPrice"].(float64) } } + globals.SugarLogger.Debug("params的值打印位置2") + globals.SugarLogger.Debug(params) if !(highestPrice > 0 && highestPrice > minimumPrice) || !(highestPrice > 0) { delete(params, "highestPrice") } if !(minimumPrice >= 0 && highestPrice > 0 && highestPrice > minimumPrice) || !(minimumPrice >= 0) { delete(params, "minimumPrice") } + globals.SugarLogger.Debug("params的值打印位置3") + globals.SugarLogger.Debug(params) db := dao.GetDB() sql, sqlParams, err := getGetStoresSkusBaseSQL(db, storeIDs, skuIDs, isFocus, keyword, isBySku, isAct, isHighPrice, priceType, actVendorID, params) if err != nil {