修改最大值和最小值的判断,要关注了才去查询

This commit is contained in:
平凡梦
2020-07-13 11:35:27 +08:00
parent bb05911858
commit d35fe7d95a

View File

@@ -455,6 +455,7 @@ func getGetStoresSkusBaseSQL(db *dao.DaoDB, storeIDs, skuIDs []int, isFocus bool
sql += ")" sql += ")"
} }
} }
if isFocus {
/*前台传入的最大值和最小值设置*/ /*前台传入的最大值和最小值设置*/
if params["highestPrice"] != "" && params["highestPrice"] != nil { if params["highestPrice"] != "" && params["highestPrice"] != nil {
//highestPrice := utils.Interface2Float64WithDefault(params["highestPrice"], 0) * 100 //highestPrice := utils.Interface2Float64WithDefault(params["highestPrice"], 0) * 100
@@ -466,6 +467,7 @@ func getGetStoresSkusBaseSQL(db *dao.DaoDB, storeIDs, skuIDs []int, isFocus bool
sql += " AND t4.unit_price >= ? " sql += " AND t4.unit_price >= ? "
sqlParams = append(sqlParams, params["minimumPrice"]) sqlParams = append(sqlParams, params["minimumPrice"])
} }
}
return sql, sqlParams, err return sql, sqlParams, err
} }