clueaddlogic.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. CreateName: req.CreateName,
  36. }
  37. status := clue.Add(l.ctx)
  38. resp.Data = map[string]interface{}{
  39. "status": status,
  40. }
  41. return
  42. }