Documentation ¶
Index ¶
- func DeleteConfig(args *ArgsDeleteConfig) (err error)
- func DeleteLog(args *ArgsDeleteLog) (err error)
- func GetConfigMoreMap(args *ArgsGetConfigMore) (data map[int64]string, err error)
- func UpdateConfig(args *ArgsUpdateConfig) (err error)
- type ArgsCreateConfig
- type ArgsCreateLog
- type ArgsDeleteConfig
- type ArgsDeleteLog
- type ArgsGetAnalysisPriceTotal
- type ArgsGetConfigByID
- type ArgsGetConfigList
- type ArgsGetConfigMore
- type ArgsGetLogList
- type ArgsUpdateConfig
- type DataGetAnalysisPriceTotal
- type FieldsConfig
- func CreateConfig(args *ArgsCreateConfig) (data FieldsConfig, err error)
- func GetConfigByID(args *ArgsGetConfigByID) (data FieldsConfig, err error)
- func GetConfigList(args *ArgsGetConfigList) (dataList []FieldsConfig, dataCount int64, err error)
- func GetConfigMore(args *ArgsGetConfigMore) (dataList []FieldsConfig, err error)
- type FieldsConfigUserSub
- type FieldsConfigUserSubs
- type FieldsConfigUserTicket
- type FieldsConfigUserTickets
- type FieldsLog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteConfig ¶
func DeleteConfig(args *ArgsDeleteConfig) (err error)
func GetConfigMoreMap ¶
func GetConfigMoreMap(args *ArgsGetConfigMore) (data map[int64]string, err error)
GetConfigMoreMap 获取一组配置名称组
Types ¶
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"` //推荐后奖励配置 MarketConfigID int64 `db:"market_config_id" json:"marketConfigID" check:"id" 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"` //奖励的来源 FromInfo CoreSQLFrom.FieldsFrom `db:"from_info" json:"fromInfo"` //奖励的用户ID UserID int64 `db:"user_id" json:"userID" check:"id"` //推荐人用户ID ReferrerUserID int64 `db:"referrer_user_id" json:"referrerUserID" check:"id" empty:"true"` //推荐成员ID ReferrerBindID int64 `db:"referrer_bind_id" json:"referrerBindID" check:"id" empty:"true"` //奖励机制配置ID ConfigID int64 `db:"config_id" json:"configID" check:"id"` //交易的金额 // 用户发生交易的总金额 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 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"` }
ArgsDeleteLog 销毁营销记录参数
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 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"` //奖励的来源 FromInfo CoreSQLFrom.FieldsFrom `db:"from_info" json:"fromInfo"` //对表成员的用户ID // 和成员对等,可用于一次性推荐的记录处理 UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"` //推荐人 ReferrerUserID int64 `db:"referrer_user_id" json:"referrerUserID" check:"id" empty:"true"` //推荐成员ID ReferrerBindID int64 `db:"referrer_bind_id" json:"referrerBindID" check:"id" empty:"true"` //奖励依据配置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 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"` //推荐后奖励配置 MarketConfigID int64 `db:"market_config_id" json:"marketConfigID" check:"id" 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 DataGetAnalysisPriceTotal ¶
type DataGetAnalysisPriceTotal struct { //发生用户ID UserID int64 `db:"user_id" json:"userID"` //金额 PriceTotal int64 `db:"count_count" json:"priceTotal"` }
DataGetAnalysisPriceTotal 获取用户消费能力排名数据
func GetAnalysisPriceTotal ¶
func GetAnalysisPriceTotal(args *ArgsGetAnalysisPriceTotal) (dataList []DataGetAnalysisPriceTotal, err error)
GetAnalysisPriceTotal 获取用户消费能力排名
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"` //推荐后奖励配置 MarketConfigID int64 `db:"market_config_id" json:"marketConfigID"` //领取周期类型 // 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
type FieldsConfigUserSubs ¶
type FieldsConfigUserSubs []FieldsConfigUserSub
func (*FieldsConfigUserSubs) Scan ¶
func (t *FieldsConfigUserSubs) Scan(value interface{}) 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
type FieldsConfigUserTickets ¶
type FieldsConfigUserTickets []FieldsConfigUserTicket
func (*FieldsConfigUserTickets) Scan ¶
func (t *FieldsConfigUserTickets) Scan(value interface{}) error
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"` //奖励的来源 FromInfo CoreSQLFrom.FieldsFrom `db:"from_info" json:"fromInfo"` //发生用户ID UserID int64 `db:"user_id" json:"userID"` //推荐人用户ID ReferrerUserID int64 `db:"referrer_user_id" json:"referrerUserID"` //推荐成员ID ReferrerBindID int64 `db:"referrer_bind_id" json:"referrerBindID"` //赠送配置 ConfigID int64 `db:"config_id" json:"configID"` //领取积分 UserIntegral int64 `db:"user_integral" json:"userIntegral"` //领取用户订阅 UserSubs FieldsConfigUserSubs `db:"user_subs" json:"userSubs"` //领取票据 UserTickets FieldsConfigUserTickets `db:"user_tickets" json:"userTickets"` //交易的金额 // 用户发生交易的总金额 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"` //描述 Des string `db:"des" json:"des"` //扩展参数 Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"` }
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 获取日志列表
Click to show internal directories.
Click to hide internal directories.