From 126b8679fe20b9b7f45628a14dac01f86c990ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 6 Jan 2021 16:42:00 +0800 Subject: [PATCH] aa --- business/jxstore/cms/job.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/business/jxstore/cms/job.go b/business/jxstore/cms/job.go index 3796ef04b..87999a980 100644 --- a/business/jxstore/cms/job.go +++ b/business/jxstore/cms/job.go @@ -154,6 +154,9 @@ func PublishJob(ctx *jxcontext.Context, jobExt *model.JobExt) (errCode string, e } if job.Address != "" && (job.Lng == 0 || job.Lat == 0) { lng, lat, _ := api.AutonaviAPI.GetCoordinateFromAddress(job.Address, "") + if lng == 0 || lat == 0 { + return errCode, fmt.Errorf("请填写完整且正确的门店地址!") + } job.Lng = jxutils.StandardCoordinate2Int(lng) job.Lat = jxutils.StandardCoordinate2Int(lat) }