WorkMomentJob.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace app\jobs\work;
  3. use app\services\work\WorkMomentSendResultServices;
  4. use app\services\work\WorkMomentServices;
  5. use crmeb\basic\BaseJobs;
  6. use crmeb\traits\QueueTrait;
  7. /**
  8. * Class WorkMomentJob
  9. * @package app\jobs\work
  10. */
  11. class WorkMomentJob extends BaseJobs
  12. {
  13. use QueueTrait;
  14. /**
  15. * @param $jobid
  16. * @return mixed
  17. */
  18. public function task($jobid)
  19. {
  20. /** @var WorkMomentServices $service */
  21. $service = app()->make(WorkMomentServices::class);
  22. return $service->getTaskInfo($jobid);
  23. }
  24. /**
  25. * 获取任务详情
  26. * @param $momentId
  27. * @param $cursor
  28. * @return mixed
  29. */
  30. public function getTaskPage($momentId, $cursor)
  31. {
  32. /** @var WorkMomentSendResultServices $service */
  33. $service = app()->make(WorkMomentSendResultServices::class);
  34. return $service->getTaskInfo($momentId, $cursor);
  35. }
  36. /**
  37. * 获取某个成员发送朋友圈详情
  38. * @param $id
  39. * @param $momentId
  40. * @param $userId
  41. * @param $cursor
  42. * @return bool
  43. */
  44. public function getCustomerPage($id, $momentId, $userId, $cursor)
  45. {
  46. /** @var WorkMomentSendResultServices $service */
  47. $service = app()->make(WorkMomentSendResultServices::class);
  48. return $service->getCustomerList((int)$id, $momentId, $userId, $cursor);
  49. }
  50. }