完善功能

This commit is contained in:
2025-07-16 15:16:40 +08:00
parent b2871ec0d2
commit f68a5b360b
123 changed files with 4643 additions and 931 deletions

View File

@ -0,0 +1,23 @@
package admin
import (
"context"
"github.com/gogf/gf/v2/frame/g"
"server/internal/model"
"server/internal/service"
"server/api/admin/v1"
)
func (c *ControllerV1) Info(ctx context.Context, req *v1.InfoReq) (res *v1.InfoRes, err error) {
adminId := g.RequestFromCtx(ctx).GetCtxVar("id").Int64()
out, err := service.Admin().Info(ctx, &model.AdminInfoIn{AdminId: adminId})
if err != nil {
return nil, err
}
return &v1.InfoRes{
AdminId: out.AdminId,
Username: out.Username,
}, nil
}