package add_friend import ( "context" "wechat-api/internal/logic/chat" "wechat-api/internal/svc" "wechat-api/internal/types" "github.com/zeromicro/go-zero/core/logx" ) type AddFriendByPhoneLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewAddFriendByPhoneLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AddFriendByPhoneLogic { return &AddFriendByPhoneLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx} } func (l *AddFriendByPhoneLogic) AddFriendByPhone(req *types.AddWechatFriendLogInfo) (resp *types.BaseMsgResp, err error) { // todo: add your logic here and delete this line chatLogic := chat.NewAddFriendByPhoneLogic(l.ctx, l.svcCtx) nreq := &types.AddFriendByPhoneReq{Type: req.Type, WeChatIds: req.WeChatIds, Phones: req.Phones, Message: req.Message, CallbackURL: req.CallbackURL} return chatLogic.AddFriendByPhone(nreq) }