MapArea

package
v5.1.34 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPointInArea

func CheckPointInArea(args *ArgsCheckPointInArea) bool

CheckPointInArea 检查某点在哪组分区

func Delete

func Delete(args *ArgsDelete) (err error)

Delete 删除分区 如果删除上级分区,将递归删除下属所有分区

func GetMoreMap

func GetMoreMap(args *ArgsGetMore) (data map[int64]string, err error)

func SearchName

func SearchName(args *ArgsSearchName) (dataMaps map[int64]string, dataCount int64, err error)

SearchName 搜索专用方法

func Update

func Update(args *ArgsUpdate) (errCode string, err error)

Update 修改分区

Types

type ArgsCheckPointInArea

type ArgsCheckPointInArea struct {
	//地图制式
	// 0 / 1 / 2 / 3
	// WGS-84 / GCJ-02 / BD-09 / 2000-china
	MapType int `db:"map_type" json:"mapType"`
	//要检查的点
	Point CoreSQLGPS.FieldsPoint `db:"point" json:"point"`
	//地图ID
	AreaID int64 `db:"area_id" json:"areaID" check:"id"`
}

ArgsCheckPointInArea 检查某点在哪组分区参数

type ArgsCheckPointInAreas

type ArgsCheckPointInAreas struct {
	//地图制式
	// 0 / 1 / 2 / 3
	// WGS-84 / GCJ-02 / BD-09 / 2000-china
	MapType int `db:"map_type" json:"mapType"`
	//要检查的点
	Point CoreSQLGPS.FieldsPoint `db:"point" json:"point"`
	//组织ID
	// 可选
	// -1 跳过
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//是否为上级ID
	// 上级将强制约束为0,否则必须>0
	IsParent bool `db:"is_parent" json:"isParent" check:"bool" empty:"true"`
	//是否启用优先级机制
	NeedLevel bool `json:"needLevel" check:"bool"`
	//标识码
	// 可选
	Mark string `db:"mark" json:"mark" check:"mark" empty:"true"`
}

ArgsCheckPointInAreas 检查某点在哪组分区参数

type ArgsCreate

type ArgsCreate struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//分区标识码
	// 后端不做任何限制,该信息作为前端抽取数据类型使用
	Mark string `db:"mark" json:"mark" check:"mark" empty:"true"`
	//归属关系
	// 可以作为行政分区和下级配送分区关系的设置,只有平台方能设置没有上级的分区
	// 其他分区必须指定行政分区作为上级,否则无法建立分区
	// 上级分区必须同属一个城市,且所有点不能超越范围
	ParentID int64 `db:"parent_id" json:"parentID" check:"id" empty:"true"`
	//名称
	Name string `db:"name" json:"name" check:"name"`
	//描述
	Des string `db:"des" json:"des" check:"des" min:"1" max:"3000" empty:"true"`
	//所属国家 国家代码
	// eg: china => 86
	Country int `db:"country" json:"country" check:"country"`
	//所属城市
	City int `db:"city" json:"city" check:"city"`
	//地图制式
	// 0 / 1 / 2
	// WGS-84 / GCJ-02 / BD-09
	MapType int `db:"map_type" json:"mapType"`
	//坐标系
	Points CoreSQLGPS.FieldsPoints `db:"points" json:"points"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

ArgsCreate 创建分区参数

type ArgsDelete

type ArgsDelete struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//组织ID
	// 可选
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
}

ArgsDelete 删除分区参数

type ArgsGetByID

type ArgsGetByID struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//组织ID
	// 可选
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
}

ArgsGetByID 获取ID参数

type ArgsGetList

type ArgsGetList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//组织ID
	// -1 跳过
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//分区标识码
	// 后端不做任何限制,该信息作为前端抽取数据类型使用
	Mark string `db:"mark" json:"mark" check:"mark" empty:"true"`
	//归属关系
	// -1 跳过
	// 可以作为行政分区和下级配送分区关系的设置,只有平台方能设置没有上级的分区
	// 其他分区必须指定行政分区作为上级,否则无法建立分区
	// 上级分区必须同属一个城市,且所有点不能超越范围
	ParentID int64 `db:"parent_id" json:"parentID" check:"id" empty:"true"`
	//所属国家 国家代码
	// -1 跳过
	// eg: china => 86
	Country int `db:"country" json:"country" check:"country" empty:"true"`
	//所属城市
	// -1 跳过
	City int `db:"city" json:"city" check:"city" empty:"true"`
	//地图制式
	// -1 跳过
	// 0 / 1 / 2
	// WGS-84 / GCJ-02 / BD-09
	MapType int `db:"map_type" json:"mapType" check:"intThan0" empty:"true"`
	//是否删除
	IsRemove bool `db:"is_remove" json:"isRemove" check:"bool"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

ArgsGetList 获取列表参数

type ArgsGetMore

type ArgsGetMore struct {
	//ID列
	IDs pq.Int64Array `json:"ids"`
	//是否包含删除数据
	HaveRemove bool `json:"haveRemove"`
}

ArgsGetMore 批量获取参数

type ArgsSearchName

type ArgsSearchName struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//组织ID
	// -1 跳过
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//分区标识码
	// 后端不做任何限制,该信息作为前端抽取数据类型使用
	Mark string `db:"mark" json:"mark" check:"mark" empty:"true"`
	//归属关系
	// -1 跳过
	// 可以作为行政分区和下级配送分区关系的设置,只有平台方能设置没有上级的分区
	// 其他分区必须指定行政分区作为上级,否则无法建立分区
	// 上级分区必须同属一个城市,且所有点不能超越范围
	ParentID int64 `db:"parent_id" json:"parentID" check:"id" empty:"true"`
	//所属国家 国家代码
	// -1 跳过
	// eg: china => 86
	Country int `db:"country" json:"country" check:"country" empty:"true"`
	//所属城市
	// -1 跳过
	City int `db:"city" json:"city" check:"city" empty:"true"`
	//地图制式
	// -1 跳过
	// 0 / 1 / 2
	// WGS-84 / GCJ-02 / BD-09
	MapType int `db:"map_type" json:"mapType" check:"intThan0" empty:"true"`
	//是否删除
	IsRemove bool `db:"is_remove" json:"isRemove" check:"bool"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

ArgsSearchName 搜索专用方法参数

type ArgsUpdate

type ArgsUpdate struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//组织ID
	// 可选
	OrgID int64 `db:"org_id" json:"orgID"`
	//分区标识码
	// 后端不做任何限制,该信息作为前端抽取数据类型使用
	Mark string `db:"mark" json:"mark" check:"mark" empty:"true"`
	//归属关系
	// 可以作为行政分区和下级配送分区关系的设置,只有平台方能设置没有上级的分区
	// 其他分区必须指定行政分区作为上级,否则无法建立分区
	// 上级分区必须同属一个城市,且所有点不能超越范围
	ParentID int64 `db:"parent_id" json:"parentID" check:"id" empty:"true"`
	//名称
	Name string `db:"name" json:"name" check:"name"`
	//描述
	Des string `db:"des" json:"des" check:"des" min:"1" max:"3000" empty:"true"`
	//所属国家 国家代码
	// eg: china => 86
	Country int `db:"country" json:"country" check:"country"`
	//所属城市
	City int `db:"city" json:"city" check:"city"`
	//地图制式
	// 0 / 1 / 2
	// WGS-84 / GCJ-02 / BD-09
	MapType int `db:"map_type" json:"mapType"`
	//坐标系
	Points CoreSQLGPS.FieldsPoints `db:"points" json:"points"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

ArgsUpdate 修改分区参数

type FieldsArea

type FieldsArea struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//更新时间
	UpdateAt time.Time `db:"update_at" json:"updateAt"`
	//删除时间
	DeleteAt time.Time `db:"delete_at" json:"deleteAt"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID"`
	//分区标识码
	// 分类标记
	Mark string `db:"mark" json:"mark"`
	//归属关系
	// 可以作为行政分区和下级配送分区关系的设置,只有平台方能设置没有上级的分区
	// 其他分区必须指定行政分区作为上级,否则无法建立分区
	// 上级分区必须同属一个城市,且所有点不能超越范围
	ParentID int64 `db:"parent_id" json:"parentID"`
	//名称
	Name string `db:"name" json:"name"`
	//描述
	Des string `db:"des" json:"des"`
	//所属国家 国家代码
	// eg: china => 86
	Country int `db:"country" json:"country"`
	//所属城市
	City int `db:"city" json:"city"`
	//地图制式
	// 0 / 1 / 2 / 3
	// WGS-84 / GCJ-02 / BD-09 / 2000-china
	MapType int `db:"map_type" json:"mapType"`
	//坐标系
	Points CoreSQLGPS.FieldsPoints `db:"points" json:"points"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

func CheckPointInAreas

func CheckPointInAreas(args *ArgsCheckPointInAreas) (dataList []FieldsArea, err error)

CheckPointInAreas 检查某点在哪组分区

func CheckPointInAreasRand

func CheckPointInAreasRand(args *ArgsCheckPointInAreas) (data FieldsArea, err error)

CheckPointInAreasRand 获取符合条件的分区,但抽取任意一个

func Create

func Create(args *ArgsCreate) (data FieldsArea, errCode string, err error)

Create 创建分区

func GetByID

func GetByID(args *ArgsGetByID) (data FieldsArea, err error)

GetByID 获取ID

func GetList

func GetList(args *ArgsGetList) (dataList []FieldsArea, dataCount int64, err error)

GetList 获取列表

func GetMore

func GetMore(args *ArgsGetMore) (dataList []FieldsArea, err error)

GetMore 批量获取

Jump to

Keyboard shortcuts

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