From 3f8bf8983602b1aed6b0838c356589103dc4b6b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 10 Dec 2020 09:57:11 +0800 Subject: [PATCH] aa --- business/model/dao/dao_job.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/business/model/dao/dao_job.go b/business/model/dao/dao_job.go index 0821eaa72..addcc1344 100644 --- a/business/model/dao/dao_job.go +++ b/business/model/dao/dao_job.go @@ -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