cluetransferlogic.go 968 B

123456789101112131415161718192021222324252627282930313233343536
  1. package logic
  2. import (
  3. "bp.jydev.jianyu360.cn/BaseService/biService/rpc/pb"
  4. "context"
  5. "log"
  6. "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
  7. "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
  8. "github.com/zeromicro/go-zero/core/logx"
  9. )
  10. type ClueTransferLogic struct {
  11. logx.Logger
  12. ctx context.Context
  13. svcCtx *svc.ServiceContext
  14. }
  15. func NewClueTransferLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ClueTransferLogic {
  16. return &ClueTransferLogic{
  17. Logger: logx.WithContext(ctx),
  18. ctx: ctx,
  19. svcCtx: svcCtx,
  20. }
  21. }
  22. func (l *ClueTransferLogic) ClueTransfer(req *types.ClueTransferReq) (resp *types.BiResp, err error) {
  23. // todo: add your logic here and delete this line
  24. res, err := l.svcCtx.BiServiceRpc.ClueTransfer(l.ctx, &pb.ClueTransferReq{
  25. ClueId: req.ClueId,
  26. ClueName: req.ClueName,
  27. })
  28. log.Println("rpc返回:", res)
  29. return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg}, err
  30. }