Browse Source

update

three
DengBiao 1 year ago
parent
commit
611299fadc
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      consume/canal_guide_order_consume.go

+ 1
- 0
consume/canal_guide_order_consume.go View File

@@ -147,6 +147,7 @@ func getUserAddress(Db *xorm.Engine, uid string, geoIp2db *geoip2.DBReader) (pro
if err != nil { if err != nil {
return return
} }
utils.FilePutContents("getUserAddress", utils.SerializeStr(userLoginIpList))
record, _ := geoIp2db.City(net.ParseIP(userLoginIpList.NowIp)) record, _ := geoIp2db.City(net.ParseIP(userLoginIpList.NowIp))
if record.Country.Names != nil && record.Subdivisions != nil && record.City.Names != nil { if record.Country.Names != nil && record.Subdivisions != nil && record.City.Names != nil {
province, err := db.ProvinceGetOneByName(record.Subdivisions[0].Names["zh-CN"]) province, err := db.ProvinceGetOneByName(record.Subdivisions[0].Names["zh-CN"])


Loading…
Cancel
Save