This commit is contained in:
suyl
2021-05-11 16:55:26 +08:00
parent 33dab7754a
commit 46cdde3d39

View File

@@ -4268,13 +4268,9 @@ func QueryPageStores2(db *dao.DaoDB, pageSize, offset int, keyword string, vendo
sqlParams = append(sqlParams, vendorID)
}
if cityCode != 0 {
sql += " AND t1.city_code = ?"
sql += " AND t2.code = ?"
sqlParams = append(sqlParams, cityCode)
}
if districtCode != 0 {
sql += " AND t1.district_code = ?"
sqlParams = append(sqlParams, districtCode)
}
if tel != "" {
sql += " AND t1.tel1 = ?"
sqlParams = append(sqlParams, tel)
@@ -4291,10 +4287,6 @@ func QueryPageStores2(db *dao.DaoDB, pageSize, offset int, keyword string, vendo
// sql += " AND t1.sku_count >= ?"
// 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 != "" {
keywordLike := "%" + keyword + "%"
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)
}
}()
fmt.Println(sql)
fmt.Println(sqlParams)
if err = dao.GetRowsTx(txDB, &shopList, sql, sqlParams...); err == nil {
pagedInfo = &model.PagedInfo{
TotalCount: dao.GetLastTotalRowCount2(db, txDB),