修正minimumPrice\highestPrice查询
This commit is contained in:
@@ -466,8 +466,6 @@ func getGetStoresSkusBaseSQL(db *dao.DaoDB, storeIDs, skuIDs []int, isFocus bool
|
|||||||
sql += " AND t4.unit_price >= ? "
|
sql += " AND t4.unit_price >= ? "
|
||||||
sqlParams = append(sqlParams, minimumPrice)
|
sqlParams = append(sqlParams, minimumPrice)
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debug("params的值打印位置4")
|
|
||||||
globals.SugarLogger.Debug(sql)
|
|
||||||
return sql, sqlParams, err
|
return sql, sqlParams, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -486,8 +484,6 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus, i
|
|||||||
if params["actVendorID"] != nil {
|
if params["actVendorID"] != nil {
|
||||||
actVendorID = int(utils.Interface2Int64WithDefault(params["actVendorID"], -1))
|
actVendorID = int(utils.Interface2Int64WithDefault(params["actVendorID"], -1))
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debug("params的值打印位置")
|
|
||||||
globals.SugarLogger.Debug(params)
|
|
||||||
var highestPrice, minimumPrice float64
|
var highestPrice, minimumPrice float64
|
||||||
if params["highestPrice"] != nil {
|
if params["highestPrice"] != nil {
|
||||||
if highestPrice, err = strconv.ParseFloat(params["highestPrice"].(string), 64); err != nil {
|
if highestPrice, err = strconv.ParseFloat(params["highestPrice"].(string), 64); err != nil {
|
||||||
@@ -499,16 +495,12 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus, i
|
|||||||
delete(params, "minimumPrice")
|
delete(params, "minimumPrice")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debug("params的值打印位置2")
|
|
||||||
globals.SugarLogger.Debug(params)
|
|
||||||
if !(highestPrice > 0 && highestPrice > minimumPrice) || !(highestPrice > 0) {
|
if !(highestPrice > 0 && highestPrice > minimumPrice) || !(highestPrice > 0) {
|
||||||
delete(params, "highestPrice")
|
delete(params, "highestPrice")
|
||||||
}
|
}
|
||||||
if !(minimumPrice >= 0 && highestPrice > 0 && highestPrice > minimumPrice) || !(minimumPrice >= 0) {
|
if !(minimumPrice >= 0 && highestPrice > 0 && highestPrice > minimumPrice) || !(minimumPrice >= 0) {
|
||||||
delete(params, "minimumPrice")
|
delete(params, "minimumPrice")
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debug("params的值打印位置3")
|
|
||||||
globals.SugarLogger.Debug(params)
|
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
sql, sqlParams, err := getGetStoresSkusBaseSQL(db, storeIDs, skuIDs, isFocus, keyword, isBySku, isAct, isHighPrice, priceType, actVendorID, params)
|
sql, sqlParams, err := getGetStoresSkusBaseSQL(db, storeIDs, skuIDs, isFocus, keyword, isBySku, isAct, isHighPrice, priceType, actVendorID, params)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user