add_friend_by_phone_logic.go 761 B

12345678910111213141516171819202122232425262728293031
  1. package add_friend
  2. import (
  3. "context"
  4. "wechat-api/internal/logic/chat"
  5. "wechat-api/internal/svc"
  6. "wechat-api/internal/types"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type AddFriendByPhoneLogic struct {
  10. logx.Logger
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. }
  14. func NewAddFriendByPhoneLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AddFriendByPhoneLogic {
  15. return &AddFriendByPhoneLogic{
  16. Logger: logx.WithContext(ctx),
  17. ctx: ctx,
  18. svcCtx: svcCtx}
  19. }
  20. func (l *AddFriendByPhoneLogic) AddFriendByPhone(req *types.AddFriendByPhoneReq) (resp *types.BaseMsgResp, err error) {
  21. // todo: add your logic here and delete this line
  22. chatLogic := chat.NewAddFriendByPhoneLogic(l.ctx, l.svcCtx)
  23. return chatLogic.AddFriendByPhone(req)
  24. }