diff --git a/business/model/dao/dao_job.go b/business/model/dao/dao_job.go index 4320954c6..1d6e5a3dc 100644 --- a/business/model/dao/dao_job.go +++ b/business/model/dao/dao_job.go @@ -436,7 +436,7 @@ func GetStationInfoList(db *DaoDB, stationName string, cityCode int, lat, lng fl SELECT SQL_CALC_FOUND_ROWS * ` 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) } sql += ` @@ -457,9 +457,9 @@ func GetStationInfoList(db *DaoDB, stationName string, cityCode int, lat, lng fl } if sortType != 0 { if sortType == 1 { - sql += " ORDER BY distance" + sql += " ORDER BY distance2" } else if sortType == -1 { - sql += " ORDER BY distance DESC" + sql += " ORDER BY distance2 DESC" } else if sortType == 2 { sql += " ORDER BY star_num" } else if sortType == -2 {