aa
This commit is contained in:
@@ -3,6 +3,7 @@ package dao
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
@@ -481,6 +482,7 @@ func GetStationInfoList(db *DaoDB, stationName string, cityCode int, lat, lng fl
|
|||||||
for _, v := range stations {
|
for _, v := range stations {
|
||||||
utils.Map2StructByJson(v.Prices, &v.OilInfo, false)
|
utils.Map2StructByJson(v.Prices, &v.OilInfo, false)
|
||||||
}
|
}
|
||||||
|
if math.Abs(utils.Int2Float64(sortType)) == 3 {
|
||||||
if oilCode != "" {
|
if oilCode != "" {
|
||||||
for i := 0; i < len(stations); i++ {
|
for i := 0; i < len(stations); i++ {
|
||||||
for j := 0; j < len(stations)-i-1; j++ {
|
for j := 0; j < len(stations)-i-1; j++ {
|
||||||
@@ -515,5 +517,7 @@ func GetStationInfoList(db *DaoDB, stationName string, cityCode int, lat, lng fl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pagedInfo.Data = stations
|
||||||
|
}
|
||||||
return pagedInfo, err
|
return pagedInfo, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user