package logic import ( quitl "app.yhyue.com/moapp/jybase/common" "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/entity" "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service" "context" "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/internal/svc" "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/medical" "github.com/zeromicro/go-zero/core/logx" ) type UserAuthInfoLogic struct { ctx context.Context svcCtx *svc.ServiceContext logx.Logger } func NewUserAuthInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserAuthInfoLogic { return &UserAuthInfoLogic{ ctx: ctx, svcCtx: svcCtx, Logger: logx.WithContext(ctx), } } // 获取用户认证信息 func (l *UserAuthInfoLogic) UserAuthInfo(in *medical.CommonReq) (*medical.UserInfoResp, error) { // todo: add your logic here and delete this line m := service.AuthService{} data := m.UserAuthInfo(in) result := &medical.UserInfoResp{} if data != nil { result.Status = true result.Data = &medical.UserInfo{ Mail: quitl.InterfaceToStr((*data)["mail"]), Name: quitl.InterfaceToStr((*data)["name"]), Phone: quitl.InterfaceToStr((*data)["phone"]), EntName: quitl.InterfaceToStr((*data)["ent_name"]), Position: quitl.InterfaceToStr((*data)["position"]), Department: quitl.InterfaceToStr((*data)["department"]), EntCode: quitl.InterfaceToStr((*data)["ent_code"]), } } else { result.Status = false } result.ErrorCode = entity.SUCCESSCODE return &medical.UserInfoResp{}, nil }