fusenapi/server/render/internal/logic/tounitylogic.go
2023-06-29 18:04:59 +08:00

35 lines
781 B
Go

package logic
import (
"fusenapi/utils/auth"
"fusenapi/utils/basic"
"context"
"fusenapi/server/render/internal/svc"
"fusenapi/server/render/internal/types"
"github.com/zeromicro/go-zero/core/logx"
)
type ToUnityLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
func NewToUnityLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ToUnityLogic {
return &ToUnityLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
func (l *ToUnityLogic) ToUnity(req *types.RequestToUnity, userinfo *auth.UserInfo) (resp *basic.Response) {
// 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data)
// userinfo 传入值时, 一定不为null
return resp.SetStatus(basic.CodeOK)
}