package logic import ( "bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice" "context" "fmt" "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc" "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types" "github.com/zeromicro/go-zero/core/logx" ) type AddEntPersonLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewAddEntPersonLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AddEntPersonLogic { return &AddEntPersonLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *AddEntPersonLogic) AddEntPerson(req *types.AddEntPersonReq) (resp *types.BiResp, err error) { // todo: add your logic here and delete this line fmt.Println(req) res, err := l.svcCtx.BiServiceRpc.AddEntPerson(l.ctx, &biservice.AddEntPersonReq{ EntId: req.EntId, Phone: req.Phone, PersonName: req.PersonName, }) return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err }