1
This commit is contained in:
@@ -3444,7 +3444,7 @@ func setImgs2(v *model.SkuName, imgs []string) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func GetSkuNamesNew(ctx *jxcontext.Context, keyword string, skuIDs, skuNameIDs []int, categoryID, status int, isBySku bool, offset, pageSize, bestSeller int) (skuNamesInfo *SkuNamesInfo, err error) {
|
||||
func GetSkuNamesNew(ctx *jxcontext.Context, keyword string, skuIDs, skuNameIDs []int, categoryID, status int, isBySku bool, offset, pageSize, bestSeller, maxPrice, minPrice int) (skuNamesInfo *SkuNamesInfo, err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
sql = ""
|
||||
@@ -3553,6 +3553,14 @@ func GetSkuNamesNew(ctx *jxcontext.Context, keyword string, skuIDs, skuNameIDs [
|
||||
sql += " AND t1.best_seller = ? "
|
||||
sqlParams = append(sqlParams, bestSeller)
|
||||
}
|
||||
if minPrice > 0 {
|
||||
sql += " AND t1.price >= ? "
|
||||
sqlParams = append(sqlParams, minPrice)
|
||||
}
|
||||
if maxPrice >= 0 {
|
||||
sql += " AND t1.price <= ? "
|
||||
sqlParams = append(sqlParams, maxPrice)
|
||||
}
|
||||
if categoryID > 0 {
|
||||
cat := &model.SkuCategory{}
|
||||
cat.ID = categoryID
|
||||
|
||||
Reference in New Issue
Block a user