- 对于DeliveryRange为空容错

This commit is contained in:
gazebo
2019-06-12 17:22:51 +08:00
parent 2df049098d
commit 262f121cb8
2 changed files with 2 additions and 2 deletions

View File

@@ -320,7 +320,7 @@ func EbaiDeliveryRegion2Jx(deliveryRegion interface{}) string {
func JxDeliveryRegion2Ebai(store *model.Store) (deliveryRegion interface{}) {
rangeStr := strings.Trim(store.DeliveryRange, ";")
if store.DeliveryRangeType == model.DeliveryRangeTypeRadius {
if utils.Str2Int64(store.DeliveryRange) > 100 { // todo 如果小于100米表示禁用不更新
if utils.Str2Int64WithDefault(store.DeliveryRange, 0) > 100 { // todo 如果小于100米表示禁用不更新
rangeStr = jxutils.GetPolygonFromCircleStr(jxutils.IntCoordinate2Standard(store.Lng), jxutils.IntCoordinate2Standard(store.Lat), utils.Str2Float64(store.DeliveryRange), 8)
} else {
rangeStr = ""