adv

package
v0.0.0-...-0e6b51b Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ERROR_NOT_FOUND = 0x0001

Variables

This section is empty.

Functions

This section is empty.

Types

type AddTask

type AddTask struct {
	Title       string `json:"title" name:"title" title:"标题"`
	Channel     string `json:"channel" name:"channel" title:"频道" index:"ASC"`
	Position    int32  `json:"position" name:"position" title:"广告组位置"`
	Pic         string `json:"pic" name:"pic" title:"图片"`
	Description string `json:"description" name:"description" title:"描述"`
	Link        string `json:"link" name:"link" title:"跳转链接"`
	Linktype    int32  `json:"linktype" name:"linktype" title:"跳转类型"`
	Sort        int32  `json:"sort" name:"sort" title:"排序"`
	Starttime   int64  `json:"starttime" name:"starttime" title:"开始时间"`
	Endtime     int64  `json:"endtime" name:"endtime" title:"结束时间"`
}

func (*AddTask) GetName

func (T *AddTask) GetName() string

func (*AddTask) GetTitle

func (T *AddTask) GetTitle() string

type Adv

type Adv struct {
	db.Object
	Channel     string `json:"channel" name:"channel" title:"频道" index:"ASC"`
	Title       string `json:"title" name:"title" title:"标题" index:"ASC"`
	Position    int32  `json:"position" name:"position" title:"广告组位置" index:"ASC"`
	Pic         string `json:"pic" name:"pic" title:"图片" length:"128"`
	Description string `json:"description" name:"description" title:"描述" length:"512"`
	Link        string `json:"link" name:"link" title:"跳转链接" length:"128"`
	Linktype    int32  `json:"linktype" name:"linktype" title:"跳转类型"`
	Sort        int32  `json:"sort" name:"sort" title:"排序"`
	Starttime   int64  `json:"starttime" name:"starttime" title:"开始时间"`
	Endtime     int64  `json:"endtime" name:"endtime" title:"结束时间"`
	Ctime       int64  `json:"ctime" name:"ctime" title:"创建时间"`
}

func (*Adv) GetName

func (O *Adv) GetName() string

func (*Adv) GetTitle

func (O *Adv) GetTitle() string

type CountData

type CountData struct {
	Total int32 `json:"total" name:"total" title:"记录数量"`
}

type CountTask

type CountTask struct {
	Id      interface{} `json:"id,omitempty" name:"id" title:"广告ID"`
	Channel interface{} `json:"channel,omitempty" name:"channel" title:"频道"`
	Stime   interface{} `json:"stime,omitempty" name:"stime" title:"开始时间"`
	Etime   interface{} `json:"etime,omitempty" name:"etime" title:"结束时间"`
}

func (*CountTask) GetName

func (T *CountTask) GetName() string

func (*CountTask) GetTitle

func (T *CountTask) GetTitle() string

type Page

type Page struct {
	P     int32 `json:"p" name:"p" title:"分页位置"`
	N     int32 `json:"n" name:"n" title:"单页记录数"`
	Count int32 `json:"count" name:"count" title:"总页数"`
	Total int32 `json:"total" name:"total" title:"总记录数"`
}

type QueryData

type QueryData struct {
	Items []*Adv `json:"items,omitempty" name:"items" title:"广告"`
	Page  *Page  `json:"page,omitempty" name:"page" title:"分页"`
}

type QueryTask

type QueryTask struct {
	Id      interface{} `json:"id,omitempty" name:"id" title:"广告ID"`
	Channel interface{} `json:"channel,omitempty" name:"channel" title:"频道"`
	Stime   interface{} `json:"stime,omitempty" name:"stime" title:"开始时间"`
	Etime   interface{} `json:"etime,omitempty" name:"etime" title:"结束时间"`
	P       interface{} `json:"p,omitempty" name:"p" title:"分页位置, 从1开始, 0 不处理分页"`
	N       interface{} `json:"n,omitempty" name:"n" title:"分页大小,默认 20"`
}

func (*QueryTask) GetName

func (T *QueryTask) GetName() string

func (*QueryTask) GetTitle

func (T *QueryTask) GetTitle() string

type RmTask

type RmTask struct {
	Id       int64  `json:"id" name:"id" title:"评论ID"`
	Channel  string `json:"channel" name:"channel" title:"频道"`
	Position int32  `json:"position" name:"position" title:"广告组位置"`
}

func (*RmTask) GetName

func (T *RmTask) GetName() string

func (*RmTask) GetTitle

func (T *RmTask) GetTitle() string

type Service

type Service struct {
}

func (*Service) Add

func (S *Service) Add(app micro.IContext, task *AddTask) (*Adv, error)

func (*Service) Count

func (S *Service) Count(app micro.IContext, task *CountTask) (*CountData, error)

func (*Service) GetName

func (S *Service) GetName() string

func (*Service) GetTitle

func (S *Service) GetTitle() string

func (*Service) Query

func (S *Service) Query(app micro.IContext, task *QueryTask) (*QueryData, error)

func (*Service) Rm

func (S *Service) Rm(app micro.IContext, task *RmTask) (*Adv, error)

func (*Service) Set

func (S *Service) Set(app micro.IContext, task *SetTask) (*Adv, error)

type SetTask

type SetTask struct {
	Id          int64  `json:"id" name:"id" title:"广告ID"`
	Title       string `json:"title" name:"title" title:"标题"`
	Channel     string `json:"channel" name:"channel" title:"频道" index:"ASC"`
	Position    int32  `json:"position" name:"position" title:"广告组位置"`
	Pic         string `json:"pic" name:"pic" title:"图片"`
	Description string `json:"description" name:"description" title:"描述"`
	Link        string `json:"link" name:"link" title:"跳转链接"`
	Linktype    int32  `json:"linktype" name:"linktype" title:"跳转类型"`
	Sort        int32  `json:"sort" name:"sort" title:"排序"`
	Starttime   int64  `json:"starttime" name:"starttime" title:"开始时间"`
	Endtime     int64  `json:"endtime" name:"endtime" title:"结束时间"`
}

func (*SetTask) GetName

func (T *SetTask) GetName() string

func (*SetTask) GetTitle

func (T *SetTask) GetTitle() string

Jump to

Keyboard shortcuts

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