aa
This commit is contained in:
@@ -506,13 +506,13 @@ func GetStationInfoList(db *DaoDB, stationName string, cityCode int, lat, lng fl
|
||||
}
|
||||
}
|
||||
if sortType == 3 {
|
||||
if utils.Str2Float64(stations[j].OilInfo[index].DiscountPrice) < utils.Str2Float64(stations[j+1].OilInfo[index2].DiscountPrice) {
|
||||
if utils.Str2Float64(stations[j].OilInfo[index].DiscountPrice) > utils.Str2Float64(stations[j+1].OilInfo[index2].DiscountPrice) {
|
||||
temp := stations[j]
|
||||
stations[j] = stations[j+1]
|
||||
stations[j+1] = temp
|
||||
}
|
||||
} else if sortType == -3 {
|
||||
if utils.Str2Float64(stations[j].OilInfo[index].DiscountPrice) > utils.Str2Float64(stations[j+1].OilInfo[index2].DiscountPrice) {
|
||||
if utils.Str2Float64(stations[j].OilInfo[index].DiscountPrice) < utils.Str2Float64(stations[j+1].OilInfo[index2].DiscountPrice) {
|
||||
temp := stations[j]
|
||||
stations[j] = stations[j+1]
|
||||
stations[j+1] = temp
|
||||
|
||||
Reference in New Issue
Block a user