package logic import ( "context" "app.yhyue.com/moapp/jybase/common" "app.yhyue.com/moapp/jybase/encrypt" "bp.jydev.jianyu360.cn/BaseService/userCenter/api/internal/svc" "bp.jydev.jianyu360.cn/BaseService/userCenter/api/internal/types" "bp.jydev.jianyu360.cn/BaseService/userCenter/entity" . "bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/usercenter" "github.com/zeromicro/go-zero/core/logx" ) type GetEntUserInfoByPositonIdLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewGetEntUserInfoByPositonIdLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetEntUserInfoByPositonIdLogic { return &GetEntUserInfoByPositonIdLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *GetEntUserInfoByPositonIdLogic) GetEntUserInfoByPositonId(req *types.GetUserInfoByPIdReq) (resp *types.Resp, err error) { positionId := encrypt.SE.Decode4Hex(req.PositionId) res, err := entity.UserCenterRpc.IdentityByPositionId(l.ctx, &IdentityReq{ Id: common.Int64All(positionId), }) return &types.Resp{ Error_code: 0, Error_msg: "", Data: map[string]interface{}{ "name": res.EntUserName, }, }, err }