package logic import ( "context" "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/pb" "github.com/zeromicro/go-zero/core/logx" ) type EntAuthLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewEntAuthLogic(ctx context.Context, svcCtx *svc.ServiceContext) *EntAuthLogic { return &EntAuthLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *EntAuthLogic) EntAuth(req *types.AuthEntReq) (resp *types.Resp, err error) { // todo: add your logic here and delete this line res, err := entity.UserCenterRpc.EntAuth(l.ctx, &pb.EntAuthReq{ Name: req.Name, CreditCode: req.CreditCode, AreaNumber: req.AreaNumber, Business: req.Business, OfficialLetter: req.OfficialLetter, OrganizationType: req.OrganizationType, ComPanyType: req.ComPanyType, AuthName: req.AuthName, AuthPhone: req.AuthPhone, Phone: req.Phone, EntId: req.EntId, }) return &types.Resp{ Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: map[string]interface{}{ "status": res.Data.Status, "entId": res.Data.EntId, }, }, err }