package logic import ( "context" "fusenapi/utils/auth" "fusenapi/product/internal/svc" "fusenapi/product/internal/types" "github.com/zeromicro/go-zero/core/logx" ) type GetProductInfoLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewGetProductInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetProductInfoLogic { return &GetProductInfoLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *GetProductInfoLogic) GetProductInfo(req *types.GetProductInfoReq, loginInfo auth.UserInfo) (resp *types.Response, err error) { //校验前台登录情况 if loginInfo.UserId == 0 { return &types.Response{Code: 402, Message: "please sign in"}, nil } return }