28 lines
567 B
Go
28 lines
567 B
Go
package admin
|
|
|
|
import (
|
|
"context"
|
|
"nova_task/internal/svc"
|
|
"nova_task/internal/types"
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
)
|
|
|
|
type GameActionLogic struct {
|
|
logx.Logger
|
|
ctx context.Context
|
|
svcCtx *svc.ServiceContext
|
|
}
|
|
|
|
func NewGameActionLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GameActionLogic {
|
|
return &GameActionLogic{
|
|
Logger: logx.WithContext(ctx),
|
|
ctx: ctx,
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
func (l *GameActionLogic) GameAction(req *types.GameActionReq) (any, error) {
|
|
return l.svcCtx.GameAction(l.ctx, req.RoleId, req.Action, nil)
|
|
}
|