From c889a01a15bfd50bce32f88b63a8684f538b222d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E8=8C=82=E6=96=B0?= Date: Fri, 12 Dec 2025 17:03:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(game):=20=E6=96=B0=E5=A2=9E=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E5=88=86=E7=B1=BB=E8=8E=B7=E5=8F=96=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/game/client.go | 8 +++++++ services/game/label.go | 47 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 services/game/label.go diff --git a/services/game/client.go b/services/game/client.go index bbefb38..6e148c6 100644 --- a/services/game/client.go +++ b/services/game/client.go @@ -130,3 +130,11 @@ func (c *Client) GetLoginBg(req *GetLoginBgReq) (resp *GetLoginBgResp, err error err = c.DoAction(req, resp) return } + +// GetLabelListByCate +// 通过分类获取标签列表 +func (c *Client) GetLabelListByCate(req *GetLabelListByCateRep) (response *GetLabelListByCateResp, err error) { + response = CreateGetLabelListByCateResp() + err = c.DoAction(req, response) + return +} diff --git a/services/game/label.go b/services/game/label.go new file mode 100644 index 0000000..f0fd993 --- /dev/null +++ b/services/game/label.go @@ -0,0 +1,47 @@ +package game + +import ( + "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests" + "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses" +) + +type GetLabelListByCateRep struct { + *requests.RpcRequest +} + +type GetLabelListByCateResp struct { + *responses.BaseResponse + Code int `json:"code"` + Msg string `json:"msg"` + Data struct { + List []Label `json:"list"` + } `json:"data"` +} + +type Label struct { + Id int `json:"id"` + CateId int `json:"cate_id"` + LabelName string `json:"label_name"` + Status int `json:"status"` + RelateUserNum int `json:"relate_user_num"` + CreateBy string `json:"create_by"` + UpdateBy string `json:"update_by"` +} + +func CreateGetLabelListByCateRep(cateIds string) *GetLabelListByCateRep { + req := &GetLabelListByCateRep{ + RpcRequest: &requests.RpcRequest{}, + } + req.InitWithApiInfo(HOST, VERSION, "/api/label/getLabelListByCate") + req.FormParams = map[string]string{ + "cate_ids": cateIds, + } + req.Method = requests.POST + return req +} + +func CreateGetLabelListByCateResp() *GetLabelListByCateResp { + return &GetLabelListByCateResp{ + BaseResponse: &responses.BaseResponse{}, + } +}