sub_table

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

README

此分表案例,其中大部分结构为自写框架中的调用,只提供思想

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewModelMgoNotifyTask

func NewModelMgoNotifyTask() *modelMgoNotifyTask

Types

type FieldNotifyTask

type FieldNotifyTask struct {
	ShardId        string    `bson:"shard_id"`        // 分片键
	TradeNum       string    `bson:"trade_num"`       //任务标识
	UserIdentifier string    `bson:"user_identifier"` //用户标识
	TransTid       string    `bson:"trans_tid"`       //广告商交易号
	NotifyUrl      string    `bson:"notify_url"`      //推送地址
	Data           string    `bson:"data"`            //推送数据
	RetryCount     int       `bson:"retry_count"`     //尝试次数
	Status         int       `bson:"status"`          //发送状态
	StatusMsg      string    `bson:"status_msg"`      //状态报文
	SdkType        int       `bson:"sdk_type"`        //来源 聚合 直媒 推送
	PushType       int       `bson:"push_type"`       //推送类型
	Flag           string    `bson:"flag"`            //贴牌标识
	ReportTime     time.Time `bson:"report_time"`     //上报时间
	UpdateTime     time.Time `bson:"update_time"`     //更新时间
	CreateTime     time.Time `bson:"create_time"`     //创建时间
}

* 任务记录

func (FieldNotifyTask) CollectionName

func (this FieldNotifyTask) CollectionName() string

* 获取集合名, 所有Field都需继承

func (*FieldNotifyTask) GetCreateTime

func (this *FieldNotifyTask) GetCreateTime() time.Time

func (*FieldNotifyTask) GetData

func (this *FieldNotifyTask) GetData() string

func (*FieldNotifyTask) GetFlag

func (this *FieldNotifyTask) GetFlag() string

func (*FieldNotifyTask) GetNotifyUrl

func (this *FieldNotifyTask) GetNotifyUrl() string

func (*FieldNotifyTask) GetPushType

func (this *FieldNotifyTask) GetPushType() int

func (*FieldNotifyTask) GetReportTime

func (this *FieldNotifyTask) GetReportTime() time.Time

func (*FieldNotifyTask) GetRetryCount

func (this *FieldNotifyTask) GetRetryCount() int

func (*FieldNotifyTask) GetSdkType

func (this *FieldNotifyTask) GetSdkType() int

func (*FieldNotifyTask) GetSeparateCollection

func (this *FieldNotifyTask) GetSeparateCollection(dateTimeInt string) string

* 获取分表集合名称 @param dataTimeInt string 分表日期 如:2022-05-11

func (*FieldNotifyTask) GetShareId

func (this *FieldNotifyTask) GetShareId() string

func (*FieldNotifyTask) GetStatus

func (this *FieldNotifyTask) GetStatus() int

func (*FieldNotifyTask) GetStatusMsg

func (this *FieldNotifyTask) GetStatusMsg() string

func (*FieldNotifyTask) GetTradeNum

func (this *FieldNotifyTask) GetTradeNum() string

func (*FieldNotifyTask) GetTransTid

func (this *FieldNotifyTask) GetTransTid() string

func (*FieldNotifyTask) GetUpdateTime

func (this *FieldNotifyTask) GetUpdateTime() time.Time

func (*FieldNotifyTask) GetUserIdentifier

func (this *FieldNotifyTask) GetUserIdentifier() string

func (*FieldNotifyTask) IndexKey

func (this *FieldNotifyTask) IndexKey() []mgo.Index

* 索引键

Jump to

Keyboard shortcuts

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