clueaddlogic.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. AppId: req.AppId,
  26. PositionId: req.PositionId,
  27. EntId: req.EntId,
  28. EntUserId: req.EntUserId,
  29. AccountId: req.AccountId,
  30. ClueName: req.ClueName,
  31. CluesSource: req.CluesSource,
  32. Summary: req.Summary,
  33. EmployInfoId: req.EmployInfoId,
  34. Types: req.Types,
  35. User: req.User,
  36. FollowUpTime: req.FollowUpTime,
  37. CreateName: req.CreateName,
  38. BaseUserId: req.BaseUserId,
  39. EntDeptId: req.EntDeptId,
  40. }
  41. status, groupId := clue.Add(l.ctx)
  42. resp.Data = map[string]interface{}{
  43. "status": status,
  44. "groupId": groupId,
  45. }
  46. return
  47. }