clueaddlogic.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 ClueAddLogic struct {
  10. logx.Logger
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. }
  14. func NewClueAddLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ClueAddLogic {
  15. return &ClueAddLogic{
  16. Logger: logx.WithContext(ctx),
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. }
  20. }
  21. func (l *ClueAddLogic) ClueAdd(req *types.ClueAddReq) (resp *types.Resp, err error) {
  22. // todo: add your logic here and delete this line
  23. res, err := l.svcCtx.BiServiceRpc.ClueAdd(l.ctx, &biservice.ClueAddReq{
  24. Phone: req.Phone,
  25. Username: req.Username,
  26. Source: req.Source,
  27. Status999: req.Status999,
  28. Owner: req.Owner,
  29. EmpNo: req.EmpNo,
  30. Company: req.Company,
  31. IsPolicymaker: req.IsPolicymaker,
  32. BelongToIndustry: req.BelongToIndustry,
  33. Job: req.Job,
  34. CustomerNeeds: req.CustomerNeeds,
  35. BelongTo: req.BelongTo,
  36. WantGoods: req.WantGoods,
  37. CustomerBudget: req.CustomerBudget,
  38. })
  39. return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
  40. }