aa
This commit is contained in:
@@ -4669,7 +4669,12 @@ func QueryPageSkus(ctx *jxcontext.Context, vendorID int, vendorStoreIDs []string
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
sql += ` )t1
|
sql += ` )t1
|
||||||
LEFT JOIN place t2 ON t2.name = t1.city_name
|
LEFT JOIN place t2 ON t2.name = t1.city_name `
|
||||||
|
if cityCode > 0 {
|
||||||
|
sql += " AND t2.code = ?"
|
||||||
|
sqlParams = append(sqlParams, cityCode)
|
||||||
|
}
|
||||||
|
sql += `
|
||||||
WHERE 1 = 1
|
WHERE 1 = 1
|
||||||
`
|
`
|
||||||
if keyword != "" {
|
if keyword != "" {
|
||||||
@@ -4681,11 +4686,6 @@ func QueryPageSkus(ctx *jxcontext.Context, vendorID int, vendorStoreIDs []string
|
|||||||
sql += " AND t1.store_id IN (" + dao.GenQuestionMarks(len(vendorStoreIDs)) + ")"
|
sql += " AND t1.store_id IN (" + dao.GenQuestionMarks(len(vendorStoreIDs)) + ")"
|
||||||
sqlParams = append(sqlParams, vendorStoreIDs)
|
sqlParams = append(sqlParams, vendorStoreIDs)
|
||||||
}
|
}
|
||||||
if cityCode > 0 {
|
|
||||||
sql += " AND t2.code = ?"
|
|
||||||
sqlParams = append(sqlParams, cityCode)
|
|
||||||
}
|
|
||||||
|
|
||||||
//if radius > 0 {
|
//if radius > 0 {
|
||||||
// sql += " AND ROUND(t1.distance * 1000) < ?"
|
// sql += " AND ROUND(t1.distance * 1000) < ?"
|
||||||
// sqlParams = append(sqlParams, radius)
|
// sqlParams = append(sqlParams, radius)
|
||||||
@@ -4717,8 +4717,6 @@ func QueryPageSkus(ctx *jxcontext.Context, vendorID int, vendorStoreIDs []string
|
|||||||
panic(r)
|
panic(r)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
fmt.Println(sql)
|
|
||||||
fmt.Println(sqlParams)
|
|
||||||
if err = dao.GetRowsTx(txDB, &results, sql, sqlParams...); err == nil {
|
if err = dao.GetRowsTx(txDB, &results, sql, sqlParams...); err == nil {
|
||||||
pagedInfo = &model.PagedInfo{
|
pagedInfo = &model.PagedInfo{
|
||||||
TotalCount: dao.GetLastTotalRowCount2(db, txDB),
|
TotalCount: dao.GetLastTotalRowCount2(db, txDB),
|
||||||
|
|||||||
Reference in New Issue
Block a user