clueaddlogic.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package logic
  2. import (
  3. "context"
  4. "bp.jydev.jianyu360.cn/CRM/application/api/internal/svc"
  5. "bp.jydev.jianyu360.cn/CRM/application/api/internal/types"
  6. "bp.jydev.jianyu360.cn/CRM/application/service"
  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.Reply, err error) {
  22. // todo: add your logic here and delete this line
  23. resp = &types.Reply{}
  24. clue := &service.SaleClueService{
  25. PositionId: req.PositionId,
  26. EntId: req.EntId,
  27. EntUserId: req.EntUserId,
  28. ClueName: req.ClueName,
  29. CluesSource: req.CluesSource,
  30. Summary: req.Summary,
  31. EmployInfoId: req.EmployInfoId,
  32. Types: req.Types,
  33. User: req.User,
  34. FollowUpTime: req.FollowUpTime,
  35. }
  36. status := clue.Add(l.ctx)
  37. resp.Data = map[string]interface{}{
  38. "status": status,
  39. }
  40. return
  41. }