package logic import ( "context" "bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/internal/svc" "bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb" "bp.jydev.jianyu360.cn/BaseService/userCenter/service" "github.com/zeromicro/go-zero/core/logx" ) type IdentityListLogic struct { ctx context.Context svcCtx *svc.ServiceContext logx.Logger } func NewIdentityListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *IdentityListLogic { return &IdentityListLogic{ ctx: ctx, svcCtx: svcCtx, Logger: logx.WithContext(ctx), } } // 获取用户可切换的身份列表 func (l *IdentityListLogic) IdentityList(in *pb.IdentityReq) (*pb.IdentityResp, error) { resp := &pb.IdentityResp{} resp.Identitys = service.IdentityList(in.UserId) return resp, nil }