1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- package logic
- import (
- "context"
- "userCenter/api/internal/svc"
- "userCenter/api/internal/types"
- "userCenter/entity"
- "userCenter/rpc/pb"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type EntInfoLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewEntInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *EntInfoLogic {
- return &EntInfoLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *EntInfoLogic) EntInfo(req *types.CheckEntReq) (resp *types.EntInfoResp, err error) {
- // todo: add your logic here and delete this line
- res, err := entity.UserCenterRpc.EntInfo(l.ctx, &pb.CheckEntReq{
- EntId: req.EntId,
- })
- data := &types.EntInfo{
- Name: res.Data.Name,
- OrganizationType: res.Data.OrganizationType,
- CreditCode: res.Data.CreditCode,
- CompanyType: res.Data.CompanyType,
- AreaNumber: res.Data.AreaNumber,
- Business: res.Data.Business,
- OfficialLetter: res.Data.OfficialLetter,
- AuthStartTime: res.Data.AuthStartTime,
- AuthEndTime: res.Data.AuthEndTime,
- ForzenStatus: res.Data.ForzenStatus,
- AuthState: res.Data.AuthState,
- ContactPerson: res.Data.ContactPerson,
- ContactPhone: res.Data.ContactPhone,
- AuthType: res.Data.AuthType,
- SubmitTime: res.Data.CreateTime,
- AuthReason: res.Data.AuthReason,
- }
- return &types.EntInfoResp{
- Error_code: res.ErrorCode,
- Error_msg: res.ErrorMsg,
- Data: data,
- }, err
- }
|