delivery

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2023 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

*

  • Copyright 2014 @ 56x.net.
  • name :
  • author : jarryliu
  • date : 2014-02-14 15:42
  • description :
  • history :

*

  • Copyright 2014 @ 56x.net.
  • name :
  • author : jarryliu
  • date : 2014-02-14 15:37
  • description :
  • history :

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDelivery

func NewDelivery(id int32, dlvRepo delivery.IDeliveryRepo) delivery.IDelivery

Types

type CoverageArea

type CoverageArea struct {
	// contains filtered or unexported fields
}

func (*CoverageArea) CanDeliver

func (c *CoverageArea) CanDeliver(lng, lat float64) (bool, int)

是否可以配送 返回是否可以配送,以及距离(米)

func (*CoverageArea) CanDeliverTo

func (c *CoverageArea) CanDeliverTo(address string) (bool, int)

是否可以配送 返回是否可以配送,以及距离(米)

func (*CoverageArea) GetDomainId

func (c *CoverageArea) GetDomainId() int32

func (*CoverageArea) GetValue

func (c *CoverageArea) GetValue() delivery.CoverageValue

func (*CoverageArea) Save

func (c *CoverageArea) Save() (int32, error)

func (*CoverageArea) SetValue

func (c *CoverageArea) SetValue(v *delivery.CoverageValue) error

type Delivery

type Delivery struct {
	// contains filtered or unexported fields
}

func (*Delivery) FindCoverageAreas

func (d *Delivery) FindCoverageAreas(lng, lat float64) []delivery.ICoverageArea

查找所有所在的区域

func (*Delivery) FindSingleCoverageArea

func (d *Delivery) FindSingleCoverageArea(lng, lat float64) delivery.ICoverageArea

查看单个所在的区域

func (*Delivery) GetAggregateRootId

func (d *Delivery) GetAggregateRootId() int32

返回聚合编号

func (*Delivery) GetArea

func (d *Delivery) GetArea(addr string) ([]*delivery.AreaValue, error)

根据地址获取地区(可能会有重复的区名)

func (*Delivery) GetCoverageArea

func (d *Delivery) GetCoverageArea(id int32) delivery.ICoverageArea

获取覆盖区域

func (*Delivery) GetDeliveryInfo

func (d *Delivery) GetDeliveryInfo(coverageId int32) (shopId, deliverUsrId int32, err error)

获取配送信息

func (*Delivery) GetMerchantId

func (d *Delivery) GetMerchantId() int32

等同于GetAggregateRootId()

func (*Delivery) GetNearestCoverage

func (d *Delivery) GetNearestCoverage(lng, lat float64) delivery.ICoverageArea

获取最近的配送区域

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL