aa
This commit is contained in:
@@ -436,7 +436,7 @@ func GetStationInfoList(db *DaoDB, stationName string, cityCode int, lat, lng fl
|
|||||||
SELECT SQL_CALC_FOUND_ROWS *
|
SELECT SQL_CALC_FOUND_ROWS *
|
||||||
`
|
`
|
||||||
if distanceFlag {
|
if distanceFlag {
|
||||||
sql += `, ROUND(POWER((POWER(longitude-?,2))+(POWER(latitude-?,2)),1/2)) distance`
|
sql += `, ROUND(POWER((POWER(longitude-?,2))+(POWER(latitude-?,2)),1/2)) distance2`
|
||||||
sqlParams = append(sqlParams, lng, lat)
|
sqlParams = append(sqlParams, lng, lat)
|
||||||
}
|
}
|
||||||
sql += `
|
sql += `
|
||||||
@@ -457,9 +457,9 @@ func GetStationInfoList(db *DaoDB, stationName string, cityCode int, lat, lng fl
|
|||||||
}
|
}
|
||||||
if sortType != 0 {
|
if sortType != 0 {
|
||||||
if sortType == 1 {
|
if sortType == 1 {
|
||||||
sql += " ORDER BY distance"
|
sql += " ORDER BY distance2"
|
||||||
} else if sortType == -1 {
|
} else if sortType == -1 {
|
||||||
sql += " ORDER BY distance DESC"
|
sql += " ORDER BY distance2 DESC"
|
||||||
} else if sortType == 2 {
|
} else if sortType == 2 {
|
||||||
sql += " ORDER BY star_num"
|
sql += " ORDER BY star_num"
|
||||||
} else if sortType == -2 {
|
} else if sortType == -2 {
|
||||||
|
|||||||
Reference in New Issue
Block a user