根据经纬度查询门店改为默认模板店

This commit is contained in:
苏尹岚
2020-03-30 10:11:33 +08:00
parent 58a044b60a
commit 5d13017af2

View File

@@ -2396,8 +2396,7 @@ func GetStoreListByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDi
city.name city_name
FROM store t1
JOIN place city ON city.code = t1.city_code
WHERE t1.deleted_at = ? AND t1.status <> ? AND id = ?
ORDER BY t1.id
WHERE t1.deleted_at = ? AND t1.status <> ? AND t1.id = ?
`
sqlParams2 := []interface{}{
// model.VendorIDJX, utils.DefaultTimeValue, model.StoreStatusDisabled,
@@ -2411,9 +2410,9 @@ func GetStoreListByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDi
102919, //商城模板店
}
dao.GetRows(dao.GetDB(), &storeList2, sql2, sqlParams2...)
if len(storeList2) > 1 {
storeList2 = storeList2[:1]
}
// if len(storeList2) > 1 {
// storeList2 = storeList2[:1]
// }
}
// 如果要求以步行距离来算