This commit is contained in:
suyl
2021-05-31 10:50:29 +08:00
parent 2e567bb2f4
commit 6ab8265cfa

View File

@@ -4668,6 +4668,12 @@ func QueryPageSkus(ctx *jxcontext.Context, vendorID int, vendorStoreIDs []string
sql += sqlEbai sql += sqlEbai
} }
} }
if sortType == 0 {
sql += `
LIMIT ? OFFSET ?
`
sqlParams = append(sqlParams, pageSize, offset)
}
sql += ` )t1 sql += ` )t1
LEFT JOIN place t2 ON t2.name = t1.city_name LEFT JOIN place t2 ON t2.name = t1.city_name
WHERE 1 = 1 WHERE 1 = 1
@@ -4705,11 +4711,15 @@ func QueryPageSkus(ctx *jxcontext.Context, vendorID int, vendorStoreIDs []string
sql += " ORDER BY t1.distance" sql += " ORDER BY t1.distance"
} }
} }
}
sql += ` sql += `
LIMIT ? OFFSET ? LIMIT ? OFFSET ?
` `
sqlParams = append(sqlParams, pageSize, offset) sqlParams = append(sqlParams, pageSize, offset)
}
//sql += `
// LIMIT ? OFFSET ?
//`
//sqlParams = append(sqlParams, pageSize, offset)
txDB, _ := dao.Begin(db) txDB, _ := dao.Begin(db)
defer func() { defer func() {
if r := recover(); r != nil { if r := recover(); r != nil {