UserGPS

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(args *ArgsCreate) (err error)

Create 添加新的定位

func DeleteByUser

func DeleteByUser(args *ArgsDeleteByUser) (err error)

DeleteByUser 删除指定用户的所有定位

func Run

func Run()

Types

type ArgsCreate

type ArgsCreate struct {
	//所属用户
	UserID int64 `db:"user_id" json:"userID" check:"id"`
	//所属国家 国家代码
	// 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"`
	//坐标位置
	Longitude float64 `db:"longitude" json:"longitude"`
	Latitude  float64 `db:"latitude" json:"latitude"`
}

ArgsCreate 添加新的定位参数

type ArgsDeleteByUser

type ArgsDeleteByUser struct {
	//用户ID
	UserID int64 `db:"user_id" json:"userID" check:"id"`
}

ArgsDeleteByUser 删除指定用户的所有定位参数

type ArgsGetLast

type ArgsGetLast struct {
	//用户ID
	UserID int64 `db:"user_id" json:"userID" check:"id"`
}

ArgsGetLast 获取最新的定位参数

type ArgsGetLastByTime

type ArgsGetLastByTime struct {
	//用户ID
	UserID int64 `db:"user_id" json:"userID" check:"id"`
	//时间
	TimeAt time.Time `db:"time_at" json:"timeAt" check:"isoTime"`
}

ArgsGetLastByTime 获取指定时间之前最新的数据参数

type ArgsGetList

type ArgsGetList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//所属用户
	UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"`
	//所属国家 国家代码
	// eg: china => 86
	Country int `db:"country" json:"country" check:"country" empty:"true"`
	//所属城市
	City int `db:"city" json:"city" check:"city" empty:"true"`
	//地图制式
	// 0 / 1 / 2
	// WGS-84 / GCJ-02 / BD-09
	MapType int `db:"map_type" json:"mapType"`
}

ArgsGetList 获取定位追踪列表参数

type ArgsGetMore

type ArgsGetMore struct {
	//用户IDs
	UserIDs pq.Int64Array `db:"user_ids" json:"userIDs" check:"ids"`
}

ArgsGetMore 获取多人的最新订单参数

type FieldsGPS

type FieldsGPS struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//所属用户
	UserID int64 `db:"user_id" json:"userID"`
	//所属国家 国家代码
	// eg: china => 86
	Country int `db:"country" json:"country"`
	//所属城市
	City int `db:"city" json:"city"`
	//地图制式
	// 0 / 1 / 2
	// WGS-84 / GCJ-02 / BD-09
	MapType int `db:"map_type" json:"mapType"`
	//坐标位置
	Longitude float64 `db:"longitude" json:"longitude"`
	Latitude  float64 `db:"latitude" json:"latitude"`
}

FieldsGPS GPS表

func GetLast

func GetLast(args *ArgsGetLast) (data FieldsGPS, err error)

GetLast 获取最新的定位

func GetLastByTime

func GetLastByTime(args *ArgsGetLastByTime) (data FieldsGPS, err error)

GetLastByTime 获取指定时间之前最新的数据

func GetList

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

GetList 获取定位追踪列表

func GetMore

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

GetMore 获取多人的最新订单

Jump to

Keyboard shortcuts

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