package controller import ( "context" "tyj_admin/api/v1/game" "tyj_admin/internal/model/entity" "tyj_admin/internal/service" "tyj_admin/internal/serviceGame" ) var GamePub = pubController{} type pubController struct { BaseController } func (c *pubController) Get(ctx context.Context, req *game.GetGameNoticeReq) (res *game.GetGameNoticeRes, err error) { res, err = serviceGame.GameNotice().GetGameNotice(ctx, req) return } func (c *pubController) GetUpdateUrl(ctx context.Context, req *game.GetGameUpdateUrlReq) (res *game.GetGameUpdateUrlRes, err error) { config := new(entity.SysConfig) res = new(game.GetGameUpdateUrlRes) config, err = service.Config().GetByKey(ctx, req.Channel+"_url") if err == nil && config != nil { res.Url = config.ConfigValue } return }