- disable ebai update store deliveryRange when radius is too small
This commit is contained in:
@@ -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, ";")
|
||||
|
||||
Reference in New Issue
Block a user