cmddto

package
v1.0.1-rel-02 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: AFL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectBulkDoc

func InjectBulkDoc(s *BulkDoc)

func InjectCmdDto

func InjectCmdDto(s *CmdDto)

func InjectScriptDto

func InjectScriptDto(s *ScriptDto)

func LoadBulkDoc

func LoadBulkDoc() baseiface.ISingleton

func LoadCmdDto

func LoadCmdDto() baseiface.ISingleton

func LoadScriptDto

func LoadScriptDto() baseiface.ISingleton

Types

type BulkDoc

type BulkDoc struct {
	basedto.BaseEntity
	Id        string                 `json:"id"`
	Doc       map[string]interface{} `json:"doc"`
	ScriptDto `json:"script_dto"`
}

func FindBeanBulkDoc

func FindBeanBulkDoc() *BulkDoc

FindBeanBulkDoc

func NewBulkDoc

func NewBulkDoc() *BulkDoc

type CmdDto

type CmdDto struct {
	basedto.BaseEntity

	esdto.ReqDto
	//es脚本
	Script *ScriptDto `json:"script,omitempty"`
	//刷新参数
	Refresh string `json:"refresh"`
	// 数据
	Data interface{} `json:"data,omitempty"`
	//文档
	Doc map[string]interface{} `json:"doc,omitempty"`
	//文档数组
	BulkDocs []*BulkDoc `json:"bulk_docs,omitempty"`
	Scroll   string     `json:"scroll"`
}

func FindBeanCmdDto

func FindBeanCmdDto() *CmdDto

FindBeanCmdDto

func NewCmdDto

func NewCmdDto() *CmdDto

func (*CmdDto) AddBulkDoc

func (self *CmdDto) AddBulkDoc(bulkDoc *BulkDoc)

func (*CmdDto) AddDoc

func (self *CmdDto) AddDoc(id string, doc map[string]interface{})

func (*CmdDto) AddDocIface

func (self *CmdDto) AddDocIface(id string, idoc any)

func (*CmdDto) AddDocScript

func (self *CmdDto) AddDocScript(script string, doc map[string]any)

func (*CmdDto) AddDocStru

func (self *CmdDto) AddDocStru(ids any, docStru any)

stru 2map

func (*CmdDto) Check

func (self *CmdDto) Check() error

func (*CmdDto) NewScript

func (self *CmdDto) NewScript() *elastic.Script

func (*CmdDto) RefreshStr

func (self *CmdDto) RefreshStr() string

func (*CmdDto) ScriptAs

func (self *CmdDto) ScriptAs(updateClause string, params map[string]interface{}) string

type EsScriptDto

type EsScriptDto struct {
	Script string                 `json:"script"`
	Typ    string                 `json:"typ"`
	Lang   string                 `json:"lang"`
	Params map[string]interface{} `json:"params"`
}

type InvitorES

type InvitorES struct {
	//邀请主键
	InvitorId int64 `json:"invitor_id"`
	//邀请人用户id
	InvitorUserId int64 `json:"invitor_user_id"`
	//上线用户id
	ParentUserId int64 `json:"parent_user_id"`
	//邀请作者成员id
	AuthorMemberId int64 `json:"author_member_id"`
	//标题
	Title string `json:"title"`
	//栏目名称
	ColumnName string `json:"column_name"`
	//发布id
	PublishingId int64 `json:"publishing_id"`
	//邀请码
	InviteCode string `json:"invite_code"`
	//创建时间
	CreatedAt time.Time `json:"created_at"`
	//邀请内容id
	ContentId int64 `json:"content_id"`
	//商户id
	ShopId int64 `json:"shop_id"`
	//栏目id
	ColumnId int64 `json:"column_id"`
	//问卷地址
	QuestionUrl string `json:"question_url"`
	//计划数
	PlanCount int64 `json:"plan_count"`
	//邀请数
	InviteCount int64 `json:"invite_count"`
	//访问数
	VisitCount int64 `json:"visit_count"`
	//报名数
	ReplyCount int64 `json:"reply_count"`
	//参加数
	AttendCount int64 `json:"attend_count"`
	//注册数
	RegisterCount     int64  `json:"register_count"`
	ShopName          string `json:"shop_name"`
	AuthorMemberName  string `json:"author_member_name"`
	Penname           string `json:"penname"`
	InvitorFullname   string `json:"invitor_fullname"`
	InviteeQrCode     string `json:"invitee_qr_code"`     // 受邀人邀请码 单人单码
	InvitorObjectType string `json:"invitor_object_type"` // 邀请人类型:用户user,联系人contact
	InvitorObjectId   int64  `json:"invitor_object_id"`   // 邀请人
	InvitorName       string `json:"invitor_name"`        // 邀请人名称
	InviteeName       string `json:"invitee_name"`        // 受邀人名称
	InviteeMobile     string `json:"invitee_mobile"`      // 受邀人电话
	GuestCount        int64  `json:"guest_count"`         // 访客数
}

func (*InvitorES) GetMapping

func (i *InvitorES) GetMapping() string

获取mappingString

func (*InvitorES) TableName

func (*InvitorES) TableName() string

type ScriptDto

type ScriptDto struct {
	basedto.BaseEntity

	UpdateClause string         `json:"update_clause"`
	Params       map[string]any `json:"params"`
}

func FindBeanScriptDto

func FindBeanScriptDto() *ScriptDto

FindBeanScriptDto

func NewScriptDto

func NewScriptDto() *ScriptDto

func (*ScriptDto) ToScript

func (self *ScriptDto) ToScript() *elastic.Script

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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