MarketCore

package
v5.1.30 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//BindSort 成员分类
	BindSort = ClassSort.Sort{
		SortTableName: "market_core_sort",
	}
	//BindTag 成员标签
	BindTag = ClassTag.Tag{
		TagTableName: "market_core_tags",
	}
	//OpenSub 是否启动订阅
	OpenSub = false
)

Functions

func DeleteBind

func DeleteBind(args *ArgsDeleteBind) (err error)

DeleteBind 删除推荐人参数

func DeleteConfig

func DeleteConfig(args *ArgsDeleteConfig) (err error)

func DeleteLog

func DeleteLog(args *ArgsDeleteLog) (err error)

DeleteLog 销毁营销记录

func GetAnalysisNewBind

func GetAnalysisNewBind(args *ArgsGetAnalysisNewBind) (count int64, err error)

GetAnalysisNewBind 获取新增关系建立人数

func GetAnalysisNewBindHavePrice

func GetAnalysisNewBindHavePrice(args *ArgsGetAnalysisNewBind) (count int64, err error)

GetAnalysisNewBindHavePrice 获取新增关系建立并发生消费人数

func GetAnalysisNewBindPrice

func GetAnalysisNewBindPrice(args *ArgsGetAnalysisNewBind) (count int64, err error)

GetAnalysisNewBindPrice 获取新增关系建立并发生消费金额合计

func GetConfigMoreMap

func GetConfigMoreMap(args *ArgsGetConfigMore) (data map[int64]string, err error)

GetConfigMoreMap 获取一组配置名称组

func UpdateBind

func UpdateBind(args *ArgsUpdateBind) (err error)

UpdateBind 更新推荐人

func UpdateBindToNewBind

func UpdateBindToNewBind(args *ArgsUpdateBindToNewBind) (err error)

UpdateBindToNewBind 批量修改营销人员关系到新营销人员

func UpdateConfig

func UpdateConfig(args *ArgsUpdateConfig) (err error)

UpdateConfig 修改配置

Types

type ArgsCreateBind

type ArgsCreateBind struct {
	//分类ID
	SortID int64 `db:"sort_id" json:"sortID" check:"id" empty:"true"`
	//标签列
	Tags pq.Int64Array `db:"tags" json:"tags" check:"ids" empty:"true"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//成员ID
	BindID int64 `db:"bind_id" json:"bindID" check:"id"`
	//绑定的用户
	BindUserID int64 `db:"bind_user_id" json:"bindUserID" check:"id" empty:"true"`
	//绑定的档案
	BindInfoID int64 `db:"bind_info_id" json:"bindInfoID" check:"id" empty:"true"`
	//建立关系的渠道
	FromInfo CoreSQLFrom.FieldsFrom `db:"from_info" json:"fromInfo"`
	//客户备注
	Des string `db:"des" json:"des" check:"des" min:"1" max:"1000" empty:"true"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

ArgsCreateBind 建立推荐人关系参数

type ArgsCreateConfig

type ArgsCreateConfig struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//名称
	Name string `db:"name" json:"name" check:"title" min:"1" max:"1000" empty:"true"`
	//领取周期类型
	// 0 不限制; 1 一次性; 2 每天限制; 3 每周限制; 4 每月限制; 5 每季度限制; 6 每年限制
	LimitTimeType int `db:"limit_time_type" json:"limitTimeType" check:"intThan0" empty:"true"`
	//领取次数
	LimitCount int `db:"limit_count" json:"limitCount" check:"intThan0" empty:"true"`
	//奖励积分
	UserIntegral int64 `db:"user_integral" json:"userIntegral" check:"int64Than0" empty:"true"`
	//奖励用户订阅
	UserSubs FieldsConfigUserSubs `db:"user_subs" json:"userSubs"`
	//奖励票据
	UserTickets FieldsConfigUserTickets `db:"user_tickets" json:"userTickets"`
	//奖励金储蓄标识码
	DepositConfigMark string `db:"deposit_config_mark" json:"depositConfigMark" check:"mark" empty:"true"`
	//奖励金额
	Price int64 `db:"price" json:"price" check:"price" empty:"true"`
	//奖励次数
	Count int64 `db:"count" json:"count" check:"int64Than0" empty:"true"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

ArgsCreateConfig 创建新的配置参数

type ArgsCreateLog

type ArgsCreateLog struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//对表成员的用户ID
	// 和成员对等,可用于一次性推荐的记录处理
	// 可以不给予,则按照成员ID走
	// 推荐的人用户ID
	UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"`
	//成员ID
	// 可以不提供,会自动根据该用户关联营销人员走
	BindID int64 `db:"bind_id" json:"bindID" check:"id" empty:"true"`
	//绑定的用户
	// 被推荐的用户ID
	BindUserID int64 `db:"bind_user_id" json:"bindUserID" check:"id" empty:"true"`
	//绑定的档案
	BindInfoID int64 `db:"bind_info_id" json:"bindInfoID" check:"id" empty:"true"`
	//奖励机制配置ID
	ConfigID int64 `db:"config_id" json:"configID" check:"id"`
	//奖励的来源
	FromInfo CoreSQLFrom.FieldsFrom `db:"from_info" json:"fromInfo"`
	//交易的金额
	// 用户发生交易的总金额
	PriceTotal int64 `db:"price_total" json:"priceTotal" check:"price" empty:"true"`
	//客户备注
	Des string `db:"des" json:"des" check:"des" min:"1" max:"1000" empty:"true"`
}

ArgsCreateLog 新的营销记录参数

type ArgsDeleteBind

type ArgsDeleteBind struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//组织ID
	// 可选
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//成员ID
	BindID int64 `db:"bind_id" json:"bindID" check:"id" empty:"true"`
}

ArgsDeleteBind 删除推荐人参数

type ArgsDeleteConfig

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

ArgsDeleteConfig 删除配置参数

type ArgsDeleteLog

type ArgsDeleteLog struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//组织ID
	// 可选
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//成员ID
	BindID int64 `db:"bind_id" json:"bindID" check:"id" empty:"true"`
}

ArgsDeleteLog 销毁营销记录参数

type ArgsGetAnalysisBind

type ArgsGetAnalysisBind struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//用户ID
	UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"`
	//成员ID
	// 和用户ID必须二选一
	BindID int64 `db:"bind_id" json:"bindID" check:"id" empty:"true"`
	//筛选配置ID
	ConfigID int64 `db:"config_id" json:"configID" check:"id" empty:"true"`
	//查询时间范围
	TimeBetween CoreSQLTime.FieldsCoreTime `json:"timeBetween"`
	//结构方式
	// year / month / day / hour
	TimeType string `json:"timeType"`
}

ArgsGetAnalysisBind 获取指定人员的推荐统计参数

type ArgsGetAnalysisCountBind

type ArgsGetAnalysisCountBind struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//筛选配置ID
	ConfigID int64 `db:"config_id" json:"configID" check:"id" empty:"true"`
	//时间段
	TimeBetween CoreSQLTime.FieldsCoreTime `json:"timeBetween"`
}

ArgsGetAnalysisCountBind 获取指定时间范围的推荐人数排序数据参数

type ArgsGetAnalysisGPS

type ArgsGetAnalysisGPS struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//时间段
	TimeBetween CoreSQLTime.DataCoreTime `json:"timeBetween"`
}

ArgsGetAnalysisGPS 获取客户的GPS分布参数

type ArgsGetAnalysisNewBind

type ArgsGetAnalysisNewBind struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//成员ID
	BindID int64 `db:"bind_id" json:"bindID" check:"id" empty:"true"`
	//时间段
	TimeBetween CoreSQLTime.DataCoreTime `json:"timeBetween"`
}

ArgsGetAnalysisNewBind 获取新增关系建立人数参数

type ArgsGetAnalysisPriceBind

type ArgsGetAnalysisPriceBind struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//筛选配置ID
	ConfigID int64 `db:"config_id" json:"configID" check:"id" empty:"true"`
	//时间段
	TimeBetween CoreSQLTime.FieldsCoreTime `json:"timeBetween"`
	//结构方式
	// year / month / day / hour
	TimeType string `json:"timeType"`
}

ArgsGetAnalysisPriceBind 获取奖励金排名参数

type ArgsGetAnalysisPriceTotal

type ArgsGetAnalysisPriceTotal struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//筛选配置ID
	ConfigID int64 `db:"config_id" json:"configID" check:"id" empty:"true"`
	//时间段
	TimeBetween CoreSQLTime.FieldsCoreTime `json:"timeBetween"`
	//结构方式
	// year / month / day / hour
	TimeType string `json:"timeType"`
}

ArgsGetAnalysisPriceTotal 获取用户消费能力排名参数

type ArgsGetBindByUserID

type ArgsGetBindByUserID struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//绑定的用户
	BindUserID int64 `db:"bind_user_id" json:"bindUserID" check:"id" empty:"true"`
	//绑定的档案
	BindInfoID int64 `db:"bind_info_id" json:"bindInfoID" check:"id" empty:"true"`
}

ArgsGetBindByUserID 获取指定用户的营销关系参数

type ArgsGetBindGroupList

type ArgsGetBindGroupList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//分类ID
	SortID int64 `db:"sort_id" json:"sortID" check:"id" empty:"true"`
	//标签列
	Tags pq.Int64Array `db:"tags" json:"tags" check:"ids" empty:"true"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//成员ID
	BindID int64 `db:"bind_id" json:"bindID" check:"id" empty:"true"`
	//建立关系的渠道
	FromInfo CoreSQLFrom.FieldsFrom `db:"from_info" json:"fromInfo"`
	//是否被删除
	IsRemove bool `db:"is_remove" json:"isRemove" check:"bool" empty:"true"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

ArgsGetBindGroupList 根据营销人员聚合数据参数

type ArgsGetBindList

type ArgsGetBindList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//分类ID
	SortID int64 `db:"sort_id" json:"sortID" check:"id" empty:"true"`
	//标签列
	Tags pq.Int64Array `db:"tags" json:"tags" check:"ids" empty:"true"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//成员ID
	BindID int64 `db:"bind_id" json:"bindID" check:"id" empty:"true"`
	//绑定的用户
	BindUserID int64 `db:"bind_user_id" json:"bindUserID" check:"id" empty:"true"`
	//绑定的档案
	BindInfoID int64 `db:"bind_info_id" json:"bindInfoID" check:"id" empty:"true"`
	//建立关系的渠道
	FromInfo CoreSQLFrom.FieldsFrom `db:"from_info" json:"fromInfo"`
	//是否被删除
	IsRemove bool `db:"is_remove" json:"isRemove" check:"bool" empty:"true"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

ArgsGetBindList 获取绑定关系参数

type ArgsGetConfigByID

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

ArgsGetConfigByID 获取指定配置ID参数

type ArgsGetConfigList

type ArgsGetConfigList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//是否被删除
	IsRemove bool `db:"is_remove" json:"isRemove" check:"bool" empty:"true"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

ArgsGetConfigList 获取配置列表参数

type ArgsGetConfigMore

type ArgsGetConfigMore struct {
	//ID列
	IDs pq.Int64Array `json:"ids"`
	//是否包含删除数据
	HaveRemove bool `json:"haveRemove"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
}

ArgsGetConfigMore 获取一组配置参数

type ArgsGetLogList

type ArgsGetLogList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//对表成员的用户ID
	// 和成员对等,可用于一次性推荐的记录处理
	UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"`
	//成员ID
	BindID int64 `db:"bind_id" json:"bindID" check:"id" empty:"true"`
	//绑定的用户
	BindUserID int64 `db:"bind_user_id" json:"bindUserID" check:"id" empty:"true"`
	//绑定的档案
	BindInfoID int64 `db:"bind_info_id" json:"bindInfoID" check:"id" empty:"true"`
	//分类ID
	SortID int64 `db:"sort_id" json:"sortID" check:"id" empty:"true"`
	//标签列
	Tags pq.Int64Array `db:"tags" json:"tags" check:"ids" empty:"true"`
	//奖励的来源
	FromInfo CoreSQLFrom.FieldsFrom `db:"from_info" json:"fromInfo"`
	//奖励依据配置ID
	ConfigID int64 `db:"config_id" json:"configID" check:"id" empty:"true"`
	//是否被删除
	IsRemove bool `db:"is_remove" json:"isRemove" check:"bool" empty:"true"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

ArgsGetLogList 获取日志列表参数

type ArgsUpdateBind

type ArgsUpdateBind struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//成员ID
	BindID int64 `db:"bind_id" json:"bindID" check:"id" empty:"true"`
	//分类ID
	SortID int64 `db:"sort_id" json:"sortID" check:"id" empty:"true"`
	//标签列
	Tags pq.Int64Array `db:"tags" json:"tags" check:"ids" empty:"true"`
	//客户备注
	Des string `db:"des" json:"des" check:"des" min:"1" max:"1000" empty:"true"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

ArgsUpdateBind 更新推荐人参数

type ArgsUpdateBindToNewBind

type ArgsUpdateBindToNewBind struct {
	//组织ID
	// -1 跳过
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//旧配送人员
	OldBindID int64 `db:"old_bind_id" json:"oldBindID" check:"id"`
	//新配送员
	NewBindID int64 `db:"new_bind_id" json:"newBindID" check:"id"`
}

ArgsUpdateBindToNewBind 批量修改营销人员关系到新营销人员参数

type ArgsUpdateConfig

type ArgsUpdateConfig struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//名称
	Name string `db:"name" json:"name" check:"title" min:"1" max:"1000" empty:"true"`
	//领取周期类型
	// 0 不限制; 1 一次性; 2 每天限制; 3 每周限制; 4 每月限制; 5 每季度限制; 6 每年限制
	LimitTimeType int `db:"limit_time_type" json:"limitTimeType" check:"intThan0" empty:"true"`
	//领取次数
	LimitCount int `db:"limit_count" json:"limitCount" check:"intThan0" empty:"true"`
	//奖励积分
	UserIntegral int64 `db:"user_integral" json:"userIntegral" check:"int64Than0" empty:"true"`
	//奖励用户订阅
	UserSubs FieldsConfigUserSubs `db:"user_subs" json:"userSubs"`
	//奖励票据
	UserTickets FieldsConfigUserTickets `db:"user_tickets" json:"userTickets"`
	//奖励金储蓄标识码
	DepositConfigMark string `db:"deposit_config_mark" json:"depositConfigMark" check:"mark" empty:"true"`
	//奖励金额
	Price int64 `db:"price" json:"price" check:"price" empty:"true"`
	//奖励次数
	Count int64 `db:"count" json:"count" check:"int64Than0" empty:"true"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

ArgsUpdateConfig 修改配置参数

type DataGetAnalysisBind

type DataGetAnalysisBind struct {
	//时间
	DayTime string `db:"d" json:"dayTime"`
	//价格合计
	Count int64 `db:"count_count" json:"count"`
}

DataGetAnalysisBind 获取指定人员的推荐统计数据

func GetAnalysisBind

func GetAnalysisBind(args *ArgsGetAnalysisBind) (dataList []DataGetAnalysisBind, err error)

GetAnalysisBind 获取指定人员的推荐统计

type DataGetAnalysisCountBind

type DataGetAnalysisCountBind struct {
	//成员ID
	BindID int64 `db:"bind_id" json:"bindID"`
	//数量
	Count int64 `db:"count_count" json:"count"`
}

DataGetAnalysisCountBind 获取指定时间范围的推荐人数排序数据数据

func GetAnalysisCountBind

func GetAnalysisCountBind(args *ArgsGetAnalysisCountBind) (dataList []DataGetAnalysisCountBind, dataCount int64, err error)

GetAnalysisCountBind 获取指定时间范围的推荐人数排序数据

type DataGetAnalysisGPS

type DataGetAnalysisGPS struct {
	//经纬度
	LogLat []float64 `json:"coord"`
	//热力度
	Level int `json:"elevation"`
}

DataGetAnalysisGPS 获取客户的GPS分布数据

func GetAnalysisGPS

func GetAnalysisGPS(args *ArgsGetAnalysisGPS) (dataList []DataGetAnalysisGPS, err error)

GetAnalysisGPS 获取客户的GPS分布

type DataGetAnalysisPriceBind

type DataGetAnalysisPriceBind struct {
	//成员ID
	BindID int64 `db:"bind_id" json:"bindID"`
	//金额
	Price int64 `db:"count_count" json:"price"`
}

DataGetAnalysisPriceBind 获取奖励金排名数据

func GetAnalysisPriceBind

func GetAnalysisPriceBind(args *ArgsGetAnalysisPriceBind) (dataList []DataGetAnalysisPriceBind, err error)

GetAnalysisPriceBind 获取奖励金排名

type DataGetAnalysisPriceTotal

type DataGetAnalysisPriceTotal struct {
	//推荐的用户ID
	BindUserID int64 `db:"bind_user_id" json:"bindUserID"`
	//金额
	PriceTotal int64 `db:"count_count" json:"priceTotal"`
}

DataGetAnalysisPriceTotal 获取用户消费能力排名数据

func GetAnalysisPriceTotal

func GetAnalysisPriceTotal(args *ArgsGetAnalysisPriceTotal) (dataList []DataGetAnalysisPriceTotal, err error)

GetAnalysisPriceTotal 获取用户消费能力排名

type DataGetBindGroupList

type DataGetBindGroupList struct {
	//成员ID
	BindID int64 `db:"bind_id" json:"bindID"`
	//关系人数
	Count int64 `db:"count" json:"count"`
}

DataGetBindGroupList 根据营销人员聚合数据数据

func GetBindGroupList

func GetBindGroupList(args *ArgsGetBindGroupList) (dataList []DataGetBindGroupList, dataCount int64, err error)

GetBindGroupList 根据营销人员聚合数据

type FieldsBind

type FieldsBind 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
	SortID int64 `db:"sort_id" json:"sortID"`
	//标签列
	Tags pq.Int64Array `db:"tags" json:"tags"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID"`
	//成员ID
	BindID int64 `db:"bind_id" json:"bindID"`
	//绑定的用户
	BindUserID int64 `db:"bind_user_id" json:"bindUserID"`
	//绑定的档案
	BindInfoID int64 `db:"bind_info_id" json:"bindInfoID"`
	//建立关系的渠道
	FromInfo CoreSQLFrom.FieldsFrom `db:"from_info" json:"fromInfo"`
	//客户备注
	Des string `db:"des" json:"des"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

FieldsBind 营销成员和客户关系

func CreateBind

func CreateBind(args *ArgsCreateBind) (data FieldsBind, err error)

CreateBind 建立推荐人关系

func GetBindByUserID

func GetBindByUserID(args *ArgsGetBindByUserID) (data FieldsBind, err error)

GetBindByUserID 获取指定用户的营销关系

func GetBindList

func GetBindList(args *ArgsGetBindList) (dataList []FieldsBind, dataCount int64, err error)

GetBindList 获取绑定关系

type FieldsConfig

type FieldsConfig 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"`
	//名称
	Name string `db:"name" json:"name"`
	//领取周期类型
	// 0 不限制; 1 一次性; 2 每天限制; 3 每周限制; 4 每月限制; 5 每季度限制; 6 每年限制
	LimitTimeType int `db:"limit_time_type" json:"limitTimeType"`
	//领取次数
	LimitCount int `db:"limit_count" json:"limitCount"`
	//奖励积分
	UserIntegral int64 `db:"user_integral" json:"userIntegral"`
	//奖励用户订阅
	UserSubs FieldsConfigUserSubs `db:"user_subs" json:"userSubs"`
	//奖励票据
	UserTickets FieldsConfigUserTickets `db:"user_tickets" json:"userTickets"`
	//奖励金储蓄标识码
	DepositConfigMark string `db:"deposit_config_mark" json:"depositConfigMark"`
	//奖励金额
	Price int64 `db:"price" json:"price"`
	//奖励次数
	Count int64 `db:"count" json:"count"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

FieldsConfig 配置项

func CreateConfig

func CreateConfig(args *ArgsCreateConfig) (data FieldsConfig, err error)

CreateConfig 创建新的配置

func GetConfigByID

func GetConfigByID(args *ArgsGetConfigByID) (data FieldsConfig, err error)

GetConfigByID 获取指定配置ID

func GetConfigList

func GetConfigList(args *ArgsGetConfigList) (dataList []FieldsConfig, dataCount int64, err error)

GetConfigList 获取配置列表

func GetConfigMore

func GetConfigMore(args *ArgsGetConfigMore) (dataList []FieldsConfig, err error)

GetConfigMore 获取一组配置

type FieldsConfigUserSub

type FieldsConfigUserSub struct {
	//订阅配置ID
	ConfigID int64 `db:"config_id" json:"configID"`
	//赠送数量
	Count int64 `db:"count" json:"count"`
	//赠送时间长度
	CountTime int64 `db:"count_time" json:"countTime"`
}

func (*FieldsConfigUserSub) Scan

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

func (FieldsConfigUserSub) Value

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

type FieldsConfigUserSubs

type FieldsConfigUserSubs []FieldsConfigUserSub

func (*FieldsConfigUserSubs) Scan

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

func (FieldsConfigUserSubs) Value

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

type FieldsConfigUserTicket

type FieldsConfigUserTicket struct {
	//配置ID
	ConfigID int64 `db:"config_id" json:"configID"`
	//票据数量
	Count int64 `db:"count" json:"count"`
}

func (*FieldsConfigUserTicket) Scan

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

func (FieldsConfigUserTicket) Value

type FieldsConfigUserTickets

type FieldsConfigUserTickets []FieldsConfigUserTicket

func (*FieldsConfigUserTickets) Scan

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

func (FieldsConfigUserTickets) Value

type FieldsLog

type FieldsLog struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//删除时间
	DeleteAt time.Time `db:"delete_at" json:"deleteAt"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID"`
	//对表成员的用户ID
	// 和成员对等,可用于一次性推荐的记录处理
	UserID int64 `db:"user_id" json:"userID"`
	//成员ID
	BindID int64 `db:"bind_id" json:"bindID"`
	//绑定的用户
	BindUserID int64 `db:"bind_user_id" json:"bindUserID"`
	//绑定的档案
	BindInfoID int64 `db:"bind_info_id" json:"bindInfoID"`
	//分类ID
	SortID int64 `db:"sort_id" json:"sortID"`
	//标签列
	Tags pq.Int64Array `db:"tags" json:"tags"`
	//领取积分
	UserIntegral int64 `db:"user_integral" json:"userIntegral"`
	//领取用户订阅
	UserSubs FieldsConfigUserSubs `db:"user_subs" json:"userSubs"`
	//领取票据
	UserTickets FieldsConfigUserTickets `db:"user_tickets" json:"userTickets"`
	//奖励的来源
	FromInfo CoreSQLFrom.FieldsFrom `db:"from_info" json:"fromInfo"`
	//交易的金额
	// 用户发生交易的总金额
	PriceTotal int64 `db:"price_total" json:"priceTotal"`
	//奖励金储蓄标识码
	DepositConfigMark string `db:"deposit_config_mark" json:"depositConfigMark"`
	//奖励金额
	Price int64 `db:"price" json:"price"`
	//奖励的次数
	// 部分系统中不一定非要奖励金额,可能只是次数
	Count int64 `db:"count" json:"count"`
	//奖励依据配置
	ConfigID int64 `db:"config_id" json:"configID"`
	//奖励原因描述
	// eg: 推荐用户注册新用户 / 推荐用户购买商品
	Des string `db:"des" json:"des"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

FieldsLog 营销记录

func CreateLog

func CreateLog(args *ArgsCreateLog) (data FieldsLog, errCode string, err error)

CreateLog 新的营销记录

func GetLogList

func GetLogList(args *ArgsGetLogList) (dataList []FieldsLog, dataCount int64, err error)

GetLogList 获取日志列表

Jump to

Keyboard shortcuts

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