From 70bf6b572a5b4b211d8782399250dbb85e4cb73d Mon Sep 17 00:00:00 2001 From: hushaoyi <3003247730@qq.com> Date: Mon, 16 Nov 2020 11:52:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0mkt=E6=89=93=E5=8C=85?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/mkt/client.go | 24 ++++++++++++++++++++++++ services/mkt/pkg_notice.go | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 services/mkt/client.go create mode 100644 services/mkt/pkg_notice.go diff --git a/services/mkt/client.go b/services/mkt/client.go new file mode 100644 index 0000000..a4d65ab --- /dev/null +++ b/services/mkt/client.go @@ -0,0 +1,24 @@ +package mkt + +import ( + "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk" + "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests" +) + +const ( + VERSION = "2020-11-16" +) + +var HOST = requests.Host{ + Default: "mkt", +} + +type Client struct { + sdk.Client +} + +func (c *Client) CodeAuth(req *PkgNoticeRequest) (response *PkgNoticeResponse, err error) { + response = CreatePkgNoticeResponse() + err = c.DoAction(req, response) + return +} diff --git a/services/mkt/pkg_notice.go b/services/mkt/pkg_notice.go new file mode 100644 index 0000000..505ee47 --- /dev/null +++ b/services/mkt/pkg_notice.go @@ -0,0 +1,36 @@ +package mkt + +import ( + "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests" + "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses" +) + +//PkgNoticeRequest 打包通知请求信息 +type PkgNoticeRequest struct { + *requests.RpcRequest + SiteID int64 `field:"site_id"` // 广告位ID + Status int `field:"status"` // 打包状态(0:失败 1:成功) +} + +//PkgNoticeResponse 打包通知响应信息 +type PkgNoticeResponse struct { + *responses.BaseResponse +} + +//CreatePkgNoticeRequest 创建通知接口 +func CreatePkgNoticeRequest() (req *PkgNoticeRequest) { + req = &PkgNoticeRequest{ + RpcRequest: &requests.RpcRequest{}, + } + req.InitWithApiInfo(HOST, VERSION, "/api/game/pkgnotice") + req.Method = requests.POST + return +} + +//CreatePkgNoticeResponse 创建通知响应 +func CreatePkgNoticeResponse() (response *PkgNoticeResponse) { + response = &PkgNoticeResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +}