package logic import ( "app.yhyue.com/moapp/jybase/common" IC "bp.jydev.jianyu360.cn/BaseService/biService/rpc/internal/config" "bp.jydev.jianyu360.cn/BaseService/biService/service" "context" "github.com/gogf/gf/v2/util/gconv" "bp.jydev.jianyu360.cn/BaseService/biService/rpc/internal/svc" "bp.jydev.jianyu360.cn/BaseService/biService/rpc/pb" "github.com/zeromicro/go-zero/core/logx" ) type AddEntPersonLogic struct { ctx context.Context svcCtx *svc.ServiceContext logx.Logger } func NewAddEntPersonLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AddEntPersonLogic { return &AddEntPersonLogic{ ctx: ctx, svcCtx: svcCtx, Logger: logx.WithContext(ctx), } } func (l *AddEntPersonLogic) AddEntPerson(in *pb.AddEntPersonReq) (*pb.BiResp, error) { // todo: add your logic here and delete this line status, err := service.AddEntPerrson(in.EntId, in.Phone, in.PersonName, IC.IC.PaymentAddress) errMsg := "" if err != nil { errMsg = err.Error() } return &pb.BiResp{ ErrorCode: gconv.Int64(common.If(status, 0, 1)), ErrorMsg: errMsg, }, err }