OrgUser

package
v5.1.40 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//OpenSub 是否启动订阅
	OpenSub = false
)

Functions

func CheckUserDataByOrg

func CheckUserDataByOrg(args *ArgsCheckUserDataByOrg) (b bool)

CheckUserDataByOrg 检查组织下是否具备对应用户聚合数据

func DeleteDataByUserID

func DeleteDataByUserID(args *ArgsDeleteDataByUserID) (err error)

DeleteDataByUserID 删除组织下旧的用户

func GetAnalysisActiveCount

func GetAnalysisActiveCount(args *ArgsGetAnalysisActiveCount) (count int64, err error)

func Init

func Init()

Types

type ArgsCheckUserDataByOrg

type ArgsCheckUserDataByOrg struct {
	//组织ID
	OrgID int64 `json:"orgID" check:"id"`
	//用户ID
	UserID int64 `db:"user_id" json:"userID" check:"id"`
}

ArgsCheckUserDataByOrg 检查组织下是否具备对应用户聚合数据参数

type ArgsDeleteDataByUserID

type ArgsDeleteDataByUserID struct {
	//用户ID
	UserID int64 `db:"user_id" json:"userID" check:"id"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
}

ArgsDeleteDataByUserID 删除组织下旧的用户参数

type ArgsGetAnalysisActiveCount

type ArgsGetAnalysisActiveCount struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//时间范围
	// 部分统计支持
	TimeBetween CoreSQLTime.DataCoreTime `json:"timeBetween"`
}

ArgsGetAnalysisActiveCount 获取活跃用户总数

type ArgsGetUserData

type ArgsGetUserData struct {
	//组织ID
	OrgID int64 `json:"orgID" check:"id"`
	//搜索电话
	SearchPhone string `json:"searchPhone" check:"search" empty:"true"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

ArgsGetUserData 获取用户数据集合参数

type ArgsGetUserDataByUserID

type ArgsGetUserDataByUserID struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//用户ID
	UserID int64 `db:"user_id" json:"userID" check:"id"`
}

ArgsGetUserDataByUserID 通过用户ID获取聚合数据参数

type ArgsGetUserDataList

type ArgsGetUserDataList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//搜索电话
	SearchPhone string `json:"searchPhone" check:"search" empty:"true"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

ArgsGetUserDataList 获取用户数据列表参数

type ArgsSearchUser

type ArgsSearchUser struct {
	//组织ID
	OrgID int64 `json:"orgID" check:"id"`
	//用户ID
	UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"`
	//搜索电话
	SearchPhone string `json:"searchPhone" check:"search" empty:"true"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

ArgsSearchUser 搜索指定的用户,或锁定ID参数

type ArgsUpdateUserData

type ArgsUpdateUserData struct {
	//组织ID
	OrgID int64 `json:"orgID" check:"id"`
	//用户ID
	UserID int64 `json:"userID" check:"id" empty:"true"`
	//用户地址ID
	UserAddressID int64 `json:"userAddressID" check:"id" empty:"true"`
}

ArgsUpdateUserData 强制更新指定用户的数据参数

type FieldsAddress

type FieldsAddress struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//更新时间
	UpdateAt time.Time `db:"update_at" json:"updateAt"`
	//所属国家 国家代码
	// eg: china => 86
	Country int `db:"country" json:"country"`
	//省份 编码
	// eg: 710000
	Province int `db:"province" json:"province"`
	//所属城市
	City int `db:"city" json:"city"`
	//街道详细信息
	Address string `db:"address" json:"address"`
	//地图制式
	// 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"`
	//联系人姓名
	Name string `db:"name" json:"name"`
	//联系人国家代码
	NationCode string `db:"nation_code" json:"nationCode"`
	//联系人手机号
	Phone string `db:"phone" json:"phone"`
}

FieldsAddress 通用地址结构

func (*FieldsAddress) Scan

func (t *FieldsAddress) Scan(value interface{}) error

func (FieldsAddress) Value

func (t FieldsAddress) Value() (driver.Value, error)

type FieldsOrgUser

type FieldsOrgUser struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//更新时间
	// 每次购物、生成订单、购买订阅、获得票据、积分变动,将更新本数据集合
	UpdateAt time.Time `db:"update_at" json:"updateAt"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID"`
	//用户ID
	UserID int64 `db:"user_id" json:"userID"`
	//用户昵称
	Name string `db:"name" json:"name"`
	//用户联系电话
	Phone string `db:"phone" json:"phone"`
	//地址结构
	AddressList FieldsOrgUserAddress `db:"address_list" json:"addressList"`
	//用户积分总数
	UserIntegral int64 `db:"user_integral" json:"userIntegral"`
	//用户订阅状态
	UserSubs FieldsOrgUserSubs `db:"user_subs" json:"userSubs"`
	//用户票据状态
	UserTickets FieldsOrgUserTickets `db:"user_tickets" json:"userTickets"`
	//储蓄状态
	DepositData FieldsOrgUserDeposits `db:"deposit_data" json:"depositData"`
	//最后一次订单结构体
	LastOrder FieldsOrgUserOrder `db:"last_order" json:"lastOrder"`
	//附加参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

FieldsOrgUser 足迹记录 数据将在每次购物等特定行为时更新,确保用户数据被动处于较为新的时间段 该数据集合同时方便检索

func GetUserData

func GetUserData(args *ArgsGetUserData) (dataList []FieldsOrgUser, err error)

GetUserData 获取用户数据集合

func GetUserDataByUserID

func GetUserDataByUserID(args *ArgsGetUserDataByUserID) (data FieldsOrgUser, err error)

GetUserDataByUserID 通过用户ID获取聚合数据

func GetUserDataList

func GetUserDataList(args *ArgsGetUserDataList) (dataList []FieldsOrgUser, dataCount int64, err error)

GetUserDataList 获取用户数据列表

func SearchUser

func SearchUser(args *ArgsSearchUser) (dataList []FieldsOrgUser)

SearchUser 搜索指定的用户,或锁定ID

func UpdateUserData

func UpdateUserData(args *ArgsUpdateUserData) (data FieldsOrgUser, err error)

UpdateUserData 强制更新指定用户的数据

type FieldsOrgUserAddress

type FieldsOrgUserAddress []FieldsAddress

FieldsOrgUserAddress 地址信息

func (*FieldsOrgUserAddress) Scan

func (t *FieldsOrgUserAddress) Scan(value interface{}) error

func (FieldsOrgUserAddress) Value

func (t FieldsOrgUserAddress) Value() (driver.Value, error)

type FieldsOrgUserDeposit

type FieldsOrgUserDeposit struct {
	//标识码
	Mark string `db:"mark" json:"mark"`
	//金额
	Price int64 `db:"price" json:"price"`
}

func (*FieldsOrgUserDeposit) Scan

func (t *FieldsOrgUserDeposit) Scan(value interface{}) error

func (FieldsOrgUserDeposit) Value

func (t FieldsOrgUserDeposit) Value() (driver.Value, error)

type FieldsOrgUserDeposits

type FieldsOrgUserDeposits []FieldsOrgUserDeposit

FieldsOrgUserDeposits 储蓄数据集合

func (*FieldsOrgUserDeposits) Scan

func (t *FieldsOrgUserDeposits) Scan(value interface{}) error

func (FieldsOrgUserDeposits) Value

func (t FieldsOrgUserDeposits) Value() (driver.Value, error)

type FieldsOrgUserOrder

type FieldsOrgUserOrder ServiceOrder.FieldsOrder

FieldsOrgUserOrder 订单结构

func (*FieldsOrgUserOrder) Scan

func (t *FieldsOrgUserOrder) Scan(value interface{}) error

func (FieldsOrgUserOrder) Value

func (t FieldsOrgUserOrder) Value() (driver.Value, error)

type FieldsOrgUserSub

type FieldsOrgUserSub struct {
	//配置ID
	ConfigID int64 `db:"config_id" json:"configID"`
	//到期时间
	ExpireAt time.Time `db:"expire_at" json:"expireAt"`
}

func (*FieldsOrgUserSub) Scan

func (t *FieldsOrgUserSub) Scan(value interface{}) error

func (FieldsOrgUserSub) Value

func (t FieldsOrgUserSub) Value() (driver.Value, error)

type FieldsOrgUserSubs

type FieldsOrgUserSubs []FieldsOrgUserSub

FieldsOrgUserSubs 用户订阅

func (*FieldsOrgUserSubs) Scan

func (t *FieldsOrgUserSubs) Scan(value interface{}) error

func (FieldsOrgUserSubs) Value

func (t FieldsOrgUserSubs) Value() (driver.Value, error)

type FieldsOrgUserTicket

type FieldsOrgUserTicket struct {
	//配置ID
	ConfigID int64 `db:"config_id" json:"configID"`
	//张数
	Count int64 `db:"count" json:"count"`
	//到期时间
	ExpireAt time.Time `db:"expire_at" json:"expireAt"`
}

func (*FieldsOrgUserTicket) Scan

func (t *FieldsOrgUserTicket) Scan(value interface{}) error

func (FieldsOrgUserTicket) Value

func (t FieldsOrgUserTicket) Value() (driver.Value, error)

type FieldsOrgUserTickets

type FieldsOrgUserTickets []FieldsOrgUserTicket

FieldsOrgUserTickets 用户票据

func (*FieldsOrgUserTickets) Scan

func (t *FieldsOrgUserTickets) Scan(value interface{}) error

func (FieldsOrgUserTickets) Value

func (t FieldsOrgUserTickets) Value() (driver.Value, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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