12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- package logic
- import (
- "context"
- "fmt"
- "bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/internal/svc"
- "bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type GetEntUserInfoLogic struct {
- ctx context.Context
- svcCtx *svc.ServiceContext
- logx.Logger
- }
- func NewGetEntUserInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetEntUserInfoLogic {
- return &GetEntUserInfoLogic{
- ctx: ctx,
- svcCtx: svcCtx,
- Logger: logx.WithContext(ctx),
- }
- }
- // 根据企业员工id获取员工的信息
- func (l *GetEntUserInfoLogic) GetEntUserInfo(in *pb.EntUserReq) (*pb.EntUserResp, error) {
- /// todo: add your logic here and delete this line
- resp := &pb.EntUserResp{}
- ret, msg := Entservice.GetEntUserInfo(in)
- fmt.Println(in.EntId, in.EntUserId, "####")
- if msg != "" {
- l.Error(fmt.Sprintf("%+v", in), msg)
- resp.ErrorMsg = msg
- resp.ErrorCode = -1
- } else {
- resp.Data = &pb.EntUser{
- Name: ret.Name,
- Phone: ret.Phone,
- Mail: ret.Mail,
- DeptName: ret.Dept_name,
- }
- }
- return resp, nil
- }
|