aa
This commit is contained in:
@@ -4268,13 +4268,9 @@ func QueryPageStores2(db *dao.DaoDB, pageSize, offset int, keyword string, vendo
|
|||||||
sqlParams = append(sqlParams, vendorID)
|
sqlParams = append(sqlParams, vendorID)
|
||||||
}
|
}
|
||||||
if cityCode != 0 {
|
if cityCode != 0 {
|
||||||
sql += " AND t1.city_code = ?"
|
sql += " AND t2.code = ?"
|
||||||
sqlParams = append(sqlParams, cityCode)
|
sqlParams = append(sqlParams, cityCode)
|
||||||
}
|
}
|
||||||
if districtCode != 0 {
|
|
||||||
sql += " AND t1.district_code = ?"
|
|
||||||
sqlParams = append(sqlParams, districtCode)
|
|
||||||
}
|
|
||||||
if tel != "" {
|
if tel != "" {
|
||||||
sql += " AND t1.tel1 = ?"
|
sql += " AND t1.tel1 = ?"
|
||||||
sqlParams = append(sqlParams, tel)
|
sqlParams = append(sqlParams, tel)
|
||||||
@@ -4291,10 +4287,6 @@ func QueryPageStores2(db *dao.DaoDB, pageSize, offset int, keyword string, vendo
|
|||||||
// sql += " AND t1.sku_count >= ?"
|
// sql += " AND t1.sku_count >= ?"
|
||||||
// sqlParams = append(sqlParams, minSkuCount)
|
// sqlParams = append(sqlParams, minSkuCount)
|
||||||
//}
|
//}
|
||||||
//if lng1 > 0 {
|
|
||||||
// sql += " AND t1.lng >= ? AND t1.lat >= ? AND t1.lng <= ? AND t1.lat <= ?"
|
|
||||||
// sqlParams = append(sqlParams, lng1, lat1, lng2, lat2)
|
|
||||||
//}
|
|
||||||
if keyword != "" {
|
if keyword != "" {
|
||||||
keywordLike := "%" + keyword + "%"
|
keywordLike := "%" + keyword + "%"
|
||||||
sql += " AND (t1.name LIKE ? OR t1.tel1 LIKE ? OR t1.org_code LIKE ? OR t1.address LIKE ? OR t2.name LIKE ? "
|
sql += " AND (t1.name LIKE ? OR t1.tel1 LIKE ? OR t1.org_code LIKE ? OR t1.address LIKE ? OR t2.name LIKE ? "
|
||||||
@@ -4316,8 +4308,6 @@ func QueryPageStores2(db *dao.DaoDB, pageSize, offset int, keyword string, vendo
|
|||||||
panic(r)
|
panic(r)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
fmt.Println(sql)
|
|
||||||
fmt.Println(sqlParams)
|
|
||||||
if err = dao.GetRowsTx(txDB, &shopList, sql, sqlParams...); err == nil {
|
if err = dao.GetRowsTx(txDB, &shopList, 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