ServiceAD2

package
v5.1.37 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//OpenAnalysis 是否启动通用框架体系的统计支持
	OpenAnalysis = false
)

Functions

func ClickAD

func ClickAD(orgID int64, mark string, key int)

ClickAD 点击广告

func Init

func Init()

func SetAD

func SetAD(args *ArgsSetAD) (err error)

SetAD 设置广告

Types

type ArgsSetAD

type ArgsSetAD struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//分区标识码
	// 同一个组织下唯一,具体行为交给mode识别和前端处理
	Mark string `db:"mark" json:"mark" check:"mark"`
	//结构
	Data FieldsADChildList `json:"data"`
}

ArgsSetAD 设置广告参数

type FieldsAD

type FieldsAD struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//更新时间
	UpdateAt time.Time `db:"update_at" json:"updateAt"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID"`
	//分区标识码
	// 同一个组织下唯一,具体行为交给mode识别和前端处理
	Mark string `db:"mark" json:"mark"`
	//结构
	Data FieldsADChildList `json:"data"`
}

FieldsAD 广告设置

func GetAD

func GetAD(orgID int64, mark string) (data FieldsAD)

GetAD 获取指定广告

func PutAD

func PutAD(orgID int64, mark string) (data FieldsAD)

PutAD 投放广告

type FieldsADChild

type FieldsADChild struct {
	//广告模式
	// none 展示类广告
	// blog_content 跳转文章; mall_core_product 跳转商品; mall_core_sort 跳转商品分类; user_ticket 跳转用户票据及优惠券; user_sub 用户会员; finance_user_deposit 用户充值
	// weixin_wxx 微信小程序广告
	Mode string `db:"mode" json:"mode" check:"mark"`
	//绑定ID
	BindID int64 `db:"bind_id" json:"bindID" check:"id" empty:"true"`
	//用于一些第三方识别系统
	BindMark string `db:"bind_mark" json:"bindMark"`
	//封面
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID" check:"id"`
}

func (*FieldsADChild) Scan

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

func (FieldsADChild) Value

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

Value sql底层处理器

type FieldsADChildList

type FieldsADChildList []FieldsADChild

func (*FieldsADChildList) Scan

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

func (FieldsADChildList) Value

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

Value sql底层处理器

Jump to

Keyboard shortcuts

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