autofollowlogic.go 900 B

123456789101112131415161718192021222324252627282930313233
  1. package logic
  2. import (
  3. "context"
  4. "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
  5. "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
  6. "bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type AutoFollowLogic struct {
  10. logx.Logger
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. }
  14. func NewAutoFollowLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AutoFollowLogic {
  15. return &AutoFollowLogic{
  16. Logger: logx.WithContext(ctx),
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. }
  20. }
  21. func (l *AutoFollowLogic) AutoFollow(req *types.CallReq) (resp *types.Resp, err error) {
  22. // todo: add your logic here and delete this line
  23. callresp, err := l.svcCtx.BiServiceRpc.AutoFollow(l.ctx, &biservice.CallReq{
  24. PositionId: req.PositionId,
  25. Phone: req.Phone,
  26. })
  27. return &types.Resp{Error_code: 1, Data: callresp.Data}, err
  28. }