- disable ebai update store deliveryRange when radius is too small

This commit is contained in:
gazebo
2018-11-19 14:30:33 +08:00
parent a2ce997a0b
commit 52b6798b44
2 changed files with 6 additions and 2 deletions

View File

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