clueaddlogic.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. }
  40. status, groupId := clue.Add(l.ctx)
  41. resp.Data = map[string]interface{}{
  42. "status": status,
  43. "groupId": groupId,
  44. }
  45. return
  46. }