From f8b948721f8d16614b858a1e977ba9e23190a149 Mon Sep 17 00:00:00 2001 From: xinian Date: Fri, 27 Feb 2026 10:21:49 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=AE=80=E5=8C=96=E7=8E=A9?= =?UTF-8?q?=E5=AE=B6=E7=A7=B0=E5=8F=B7=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E7=9B=B4=E6=8E=A5=E8=BF=94=E5=9B=9EID=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/player/controller/admin/title.go | 37 +++++++++++------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/modules/player/controller/admin/title.go b/modules/player/controller/admin/title.go index df7a1da8b..a9451ebf5 100644 --- a/modules/player/controller/admin/title.go +++ b/modules/player/controller/admin/title.go @@ -2,7 +2,6 @@ package admin import ( "blazing/cool" - dict "blazing/modules/dict/service" "blazing/modules/player/service" "context" @@ -32,33 +31,31 @@ type GetReq struct { func (c *TitleController) Get(ctx context.Context, req *GetReq) (res *cool.BaseRes, err error) { res = &cool.BaseRes{} - var ret []TitleRes + //var ret []TitleRes var ( admin = cool.GetAdmin(ctx) //r = g.RequestFromCtx(ctx) ) alltitile := service.NewUserService(uint32(admin.UserId)).Title.Get() - titles := dict.NewDictInfoService().GetData("achieve") - for _, v := range alltitile { - tt := TitleRes{ + //titles := dict.NewDictInfoService().GetData("achieve") + // tt := []uint32{} + // for _, v := range alltitile { - ID: v, - } - info := titles[v] - if info.Remark != nil { - tt.Desc = *info.Remark - } - tt.Name = info.Name - ret = append(ret, tt) - } + // //info := titles[v] + // // if info.Remark != nil { + // // tt.Desc = *info.Remark + // // } + // // tt.Name = info.Name + // tt = append(tt, v.) + // } - res.Data = ret + res.Data = alltitile return } -type TitleRes struct { - ID uint32 `json:"id"` - Name string `json:"name"` - Desc string `json:"desc"` -} +// type TitleRes struct { +// ID uint32 `json:"id"` +// Name string `json:"name"` +// Desc string `json:"desc"` +// }