campaign

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(ctx context.Context, req *AddRequest) (bool, error)

新建计划

func DaybudgetUpdate

func DaybudgetUpdate(ctx context.Context, req *DaybudgetUpdateRequest) (bool, error)

修改计划日限额

func Delete

func Delete(ctx context.Context, req *DeleteRequest) (bool, error)

删除计划

func StatusUpdate

func StatusUpdate(ctx context.Context, req *StatusUpdateRequest) (bool, error)

修改计划状态

Types

type AddData

type AddData struct {
	Result AddResult `json:"addcampain_result,omitempty" codec:"addcampain_result,omitempty"`
}

func (AddData) Error added in v1.1.1

func (r AddData) Error() string

func (AddData) IsError added in v1.1.1

func (r AddData) IsError() bool

type AddRequest

type AddRequest struct {
	api.BaseRequest
	Name      string `json:"name,omitempty" codec:"name,omitempty"`             // 计划名称
	DayBudget int    `json:"day_budget,omitempty" codec:"day_budget,omitempty"` // 预算
}

type AddResponse

type AddResponse struct {
	ErrorResp *api.ErrorResponnse `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *AddData            `json:"jingdong_dsp_kc_campainShop_add_responce,omitempty" codec:"jingdong_dsp_kc_campainShop_add_responce,omitempty"`
}

func (AddResponse) Error added in v1.1.1

func (r AddResponse) Error() string

func (AddResponse) IsError added in v1.1.1

func (r AddResponse) IsError() bool

type AddResult

type AddResult struct {
	CampaignId int    `json:"campaignId,omitempty" codec:"campaignId,omitempty"`
	Success    bool   `json:"success,omitempty" codec:"success,omitempty"`
	ResultCode string `json:"resultCode,omitempty" codec:"resultCode,omitempty"`
	ErrorMsg   string `json:"errorMsg,omitempty" codec:"errorMsg,omitempty"`
}

func (AddResult) Error added in v1.1.1

func (r AddResult) Error() string

func (AddResult) IsError added in v1.1.1

func (r AddResult) IsError() bool

type DaybudgetUpdateData

type DaybudgetUpdateData struct {
	Result *DaybudgetUpdateResult `json:"updatecampaigndaybudget_result"`
}

func (DaybudgetUpdateData) Error added in v1.1.1

func (r DaybudgetUpdateData) Error() string

func (DaybudgetUpdateData) IsError added in v1.1.1

func (r DaybudgetUpdateData) IsError() bool

type DaybudgetUpdateRequest

type DaybudgetUpdateRequest struct {
	api.BaseRequest
	CampaignId int    `json:"campaignId,omitempty" codec:"campaignId,omitempty"` // 计划id
	DayBudget  uint64 `json:"day_budget,omitempty" codec:"day_budget,omitempty"` // 预算
}

type DaybudgetUpdateResponse

type DaybudgetUpdateResponse struct {
	ErrorResp *api.ErrorResponnse  `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *DaybudgetUpdateData `` /* 134-byte string literal not displayed */
}

func (DaybudgetUpdateResponse) Error added in v1.1.1

func (r DaybudgetUpdateResponse) Error() string

func (DaybudgetUpdateResponse) IsError added in v1.1.1

func (r DaybudgetUpdateResponse) IsError() bool

type DaybudgetUpdateResult

type DaybudgetUpdateResult struct {
	CampaignId int    `json:"campaignId,omitempty" codec:"campaignId,omitempty"`
	ResultCode string `json:"resultCode,omitempty" codec:"resultCode,omitempty"`
	ErrorMsg   string `json:"errorMsg,omitempty" codec:"errorMsg,omitempty"`
	Success    bool   `json:"success,omitempty" codec:"success,omitempty"`
}

func (DaybudgetUpdateResult) Error added in v1.1.1

func (r DaybudgetUpdateResult) Error() string

func (DaybudgetUpdateResult) IsError added in v1.1.1

func (r DaybudgetUpdateResult) IsError() bool

type DeleteData

type DeleteData struct {
	Result *DeleteResult `json:"deletekuaichecampaign_result"`
}

func (DeleteData) Error added in v1.1.1

func (r DeleteData) Error() string

func (DeleteData) IsError added in v1.1.1

func (r DeleteData) IsError() bool

type DeleteRequest

type DeleteRequest struct {
	api.BaseRequest
	CompaignId string `json:"compaign_id,omitempty" codec:"compaign_id,omitempty"` // 计划id
}

type DeleteResponse

type DeleteResponse struct {
	ErrorResp *api.ErrorResponnse `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *DeleteData         `json:"jingdong_dsp_kc_campain_delete_responce,omitempty" codec:"jingdong_dsp_kc_campain_delete_responce,omitempty"`
}

func (DeleteResponse) Error added in v1.1.1

func (r DeleteResponse) Error() string

func (DeleteResponse) IsError added in v1.1.1

func (r DeleteResponse) IsError() bool

type DeleteResult

type DeleteResult struct {
	ResultCode string `json:"resultCode,omitempty" codec:"resultCode,omitempty"`
	ErrorMsg   string `json:"errorMsg,omitempty" codec:"errorMsg,omitempty"`
	Success    bool   `json:"success,omitempty" codec:"success,omitempty"`
}

func (DeleteResult) Error added in v1.1.1

func (r DeleteResult) Error() string

func (DeleteResult) IsError added in v1.1.1

func (r DeleteResult) IsError() bool

type GetData

type GetData struct {
	Result *GetResult `json:"findcampaignbyid_result"`
}

func (GetData) Error added in v1.1.1

func (r GetData) Error() string

func (GetData) IsError added in v1.1.1

func (r GetData) IsError() bool

type GetRequest

type GetRequest struct {
	api.BaseRequest
	CampaignId uint64 `json:"campaign_id,omitempty" codec:"campaign_id,omitempty"` // 计划Id
}

type GetResponse

type GetResponse struct {
	ErrorResp *api.ErrorResponnse `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *GetData            `json:"jingdong_dsp_kc_campain_get_responce,omitempty" codec:"jingdong_dsp_kc_campain_get_responce,omitempty"`
}

func (GetResponse) Error added in v1.1.1

func (r GetResponse) Error() string

func (GetResponse) IsError added in v1.1.1

func (r GetResponse) IsError() bool

type GetResult

type GetResult struct {
	ResultCode string    `json:"resultCode,omitempty" codec:"resultCode,omitempty"`
	ErrorMsg   string    `json:"errorMsg,omitempty" codec:"errorMsg,omitempty"`
	Success    bool      `json:"success,omitempty" codec:"success,omitempty"`
	Value      *GetValue `json:"value,omitempty" codec:"value,omitempty"`
}

func (GetResult) Error added in v1.1.1

func (r GetResult) Error() string

func (GetResult) IsError added in v1.1.1

func (r GetResult) IsError() bool

type GetValue

type GetValue struct {
	StartTime          string  `json:"startTime,omitempty" codec:"startTime,omitempty"`                   // 开始时间
	CampaignId         uint64  `json:"campaignId,omitempty" codec:"campaignId,omitempty"`                 // 计划Id
	Status             uint8   `json:"status,omitempty" codec:"status,omitempty"`                         // 状态
	PutType            int8    `json:"putType,omitempty" codec:"putType,omitempty"`                       // 推广类型
	Name               string  `json:"name,omitempty" codec:"name,omitempty"`                             // 姓名
	TimeRangePriceCoef string  `json:"timeRangePriceCoef,omitempty" codec:"timeRangePriceCoef,omitempty"` // 推广时间
	Yn                 int8    `json:"yn,omitempty" codec:"yn,omitempty"`                                 // 是否有效
	EndTime            string  `json:"endTime,omitempty" codec:"endTime,omitempty"`                       // 结束时间
	DayBudget          float64 `json:"dayBudget,omitempty" codec:"dayBudget,omitempty"`                   // 日限额
}

func Get

func Get(ctx context.Context, req *GetRequest) (*GetValue, error)

查询.快车.计划信息(指定计划ID)

type ListData

type ListData struct {
	Result *ListResult `json:"querylistbyparam_result"`
}

func (ListData) Error added in v1.1.1

func (r ListData) Error() string

func (ListData) IsError added in v1.1.1

func (r ListData) IsError() bool

type ListRequest

type ListRequest struct {
	api.BaseRequest
	PageNum  int `json:"page_num,omitempty" codec:"page_num,omitempty"`
	PageSize int `json:"page_size,omitempty" codec:"page_size,omitempty"`
}

type ListResponse

type ListResponse struct {
	ErrorResp *api.ErrorResponnse `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *ListData           `json:"jingdong_dsp_kc_campain_list_responce,omitempty" codec:"jingdong_dsp_kc_campain_list_responce,omitempty"`
}

func (ListResponse) Error added in v1.1.1

func (r ListResponse) Error() string

func (ListResponse) IsError added in v1.1.1

func (r ListResponse) IsError() bool

type ListResult

type ListResult struct {
	ResultCode string     `json:"resultCode,omitempty" codec:"resultCode,omitempty"`
	ErrorMsg   string     `json:"errorMsg,omitempty" codec:"errorMsg,omitempty"`
	Success    bool       `json:"success,omitempty" codec:"success,omitempty"`
	Value      *ListValue `json:"value,omitempty" codec:"value,omitempty"`
}

func (ListResult) Error added in v1.1.1

func (r ListResult) Error() string

func (ListResult) IsError added in v1.1.1

func (r ListResult) IsError() bool

type ListValue

type ListValue struct {
	Datas     []Query        `json:"datas,omitempty" codec:"datas,omitempty"`
	Paginator *dsp.Paginator `json:"paginator,omitempty" codec:"paginator,omitempty"`
}

type Query

type Query struct {
	Id                 uint64  `json:"id,omitempty" codec:"id,omitempty"`                                 // 计划ID
	Name               string  `json:"name,omitempty" codec:"name,omitempty"`                             // 计划名称
	DayBudgetStr       string  `json:"dayBudgetStr,omitempty" codec:"dayBudgetStr,omitempty"`             // 预算
	DayBudgetResult    float64 `json:"dayBudgetResult,omitempty" codec:"dayBudgetResult,omitempty"`       // 预算
	StartTime          uint64  `json:"startTime,omitempty" codec:"startTime,omitempty"`                   // 开始时间
	EneTime            uint64  `json:"eneTime,omitempty" codec:"eneTime,omitempty"`                       // 结束时间
	TimeRangePriceCoef string  `json:"timeRangePriceCoef,omitempty" codec:"timeRangePriceCoef,omitempty"` // 投放时间段
	Status             int     `json:"status,omitempty" codec:"status,omitempty"`                         // 状态
	PutType            int     `json:"putType,omitempty" codec:"putType,omitempty"`                       // 推广类型
	BusinessType       int     `json:"businessType,omitempty" codec:"businessType,omitempty"`             // 业务类型
}

func List

func List(ctx context.Context, req *ListRequest) ([]Query, int, error)

快车.计划信息(批量获取)

type StatusUpdateData

type StatusUpdateData struct {
	Result *StatusUpdateResult `json:"updatestatus_result"`
}

func (StatusUpdateData) Error added in v1.1.1

func (r StatusUpdateData) Error() string

func (StatusUpdateData) IsError added in v1.1.1

func (r StatusUpdateData) IsError() bool

type StatusUpdateRequest

type StatusUpdateRequest struct {
	api.BaseRequest
	Status     int    `json:"status,omitempty" codec:"status,omitempty"`
	CompaignId string `json:"compaignId,omitempty" codec:"compaignId,omitempty"`
}

type StatusUpdateResponse

type StatusUpdateResponse struct {
	ErrorResp *api.ErrorResponnse `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *StatusUpdateData   `` /* 128-byte string literal not displayed */
}

func (StatusUpdateResponse) Error added in v1.1.1

func (r StatusUpdateResponse) Error() string

func (StatusUpdateResponse) IsError added in v1.1.1

func (r StatusUpdateResponse) IsError() bool

type StatusUpdateResult

type StatusUpdateResult struct {
	Status     int    `json:"status,omitempty" codec:"status,omitempty"`
	ResultCode string `json:"resultCode,omitempty" codec:"resultCode,omitempty"`
	ErrorMsg   string `json:"errorMsg,omitempty" codec:"errorMsg,omitempty"`
	Success    bool   `json:"success,omitempty" codec:"success,omitempty"`
}

func (StatusUpdateResult) Error added in v1.1.1

func (r StatusUpdateResult) Error() string

func (StatusUpdateResult) IsError added in v1.1.1

func (r StatusUpdateResult) IsError() bool

Jump to

Keyboard shortcuts

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