playerloginlogic.go 705 B

12345678910111213141516171819202122232425262728293031323334
  1. package logic
  2. import (
  3. "context"
  4. "ylink/gateway/rpc/internal/svc"
  5. "ylink/gateway/rpc/pb"
  6. "github.com/zeromicro/go-zero/core/logx"
  7. )
  8. type PlayerLoginLogic struct {
  9. ctx context.Context
  10. svcCtx *svc.ServiceContext
  11. logx.Logger
  12. }
  13. func NewPlayerLoginLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PlayerLoginLogic {
  14. return &PlayerLoginLogic{
  15. ctx: ctx,
  16. svcCtx: svcCtx,
  17. Logger: logx.WithContext(ctx),
  18. }
  19. }
  20. func (l *PlayerLoginLogic) PlayerLogin(in *pb.PlayerLoginReq) (*pb.LoginResp, error) {
  21. // todo: add your logic here and delete this line
  22. return &pb.LoginResp{
  23. AccessToken: in.PlayerId,
  24. AccessExpire: 100,
  25. RefreshAfter: 100,
  26. Url: "www.baidu.com"}, nil
  27. }