task_default_list_conditions.go 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package pack
  2. import (
  3. "github.com/caixw/lib.go/conv"
  4. "youngee_m_api/model/common_model"
  5. "youngee_m_api/model/http_model"
  6. )
  7. func HttpTaskDefaultReviewListRequestToCondition(req *http_model.TaskDefaultReviewListRequest) *common_model.TalentConditions {
  8. return &common_model.TalentConditions{
  9. ProjectId: req.ProjectId,
  10. DefaultStatus: conv.MustInt64(req.DefaultStatus, 0),
  11. StrategyId: conv.MustInt64(req.StrategyId, 0),
  12. TaskId: conv.MustString(req.TaskId, ""),
  13. PlatformNickname: conv.MustString(req.PlatformNickname, ""),
  14. }
  15. }
  16. func HttpTaskDefaultDataListRequestToCondition(req *http_model.TaskDefaultDataListRequest) *common_model.TalentConditions {
  17. return &common_model.TalentConditions{
  18. ProjectId: req.ProjectId,
  19. DefaultStatus: conv.MustInt64(req.DefaultStatus, 0),
  20. StrategyId: conv.MustInt64(req.StrategyId, 0),
  21. TaskId: conv.MustString(req.TaskId, ""),
  22. PlatformNickname: conv.MustString(req.PlatformNickname, ""),
  23. }
  24. }
  25. func HttpTaskTerminatingListRequestToCondition(req *http_model.TaskTerminatingListRequest) *common_model.TalentConditions {
  26. return &common_model.TalentConditions{
  27. ProjectId: req.ProjectId,
  28. DefaultStatus: conv.MustInt64(req.DefaultStatus, 0),
  29. StrategyId: conv.MustInt64(req.StrategyId, 0),
  30. TaskId: conv.MustString(req.TaskId, ""),
  31. PlatformNickname: conv.MustString(req.PlatformNickname, ""),
  32. }
  33. }
  34. func HttpTaskTerminatedListRequestToCondition(req *http_model.TaskTerminatedListRequest) *common_model.TalentConditions {
  35. return &common_model.TalentConditions{
  36. ProjectId: req.ProjectId,
  37. DefaultStatus: conv.MustInt64(req.DefaultStatus, 0),
  38. StrategyId: conv.MustInt64(req.StrategyId, 0),
  39. TaskId: conv.MustString(req.TaskId, ""),
  40. PlatformNickname: conv.MustString(req.PlatformNickname, ""),
  41. }
  42. }