debug address

This commit is contained in:
richboo111
2022-07-20 14:24:35 +08:00
parent 6ad5157cdc
commit c34535b638

View File

@@ -155,9 +155,10 @@ func PublishJob(ctx *jxcontext.Context, jobExt *model.JobExt) (jobID int, errCod
}
}
if job.Address != "" && (job.Lng == 0 || job.Lat == 0) {
fmt.Println("================================" + job.Address)
globals.SugarLogger.Debugf("==================" + job.Address)
lng, lat, _ := api.AutonaviAPI.GetCoordinateFromAddressByPage(job.Address, job.JobCityCode)
fmt.Println("=========", lng, "=============", lat)
globals.SugarLogger.Debugf("%f", lng)
globals.SugarLogger.Debugf("%f", lat)
if lng == 0 || lat == 0 {
return 0, errCode, fmt.Errorf("请填写完整且正确的门店地址!")
}