AutoTakeOrderJob.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\jobs\order;
  12. use app\services\order\StoreOrderTakeServices;
  13. use crmeb\basic\BaseJobs;
  14. use crmeb\traits\QueueTrait;
  15. /**
  16. * 自动执行确认收货
  17. * Class AutoTakeOrderJob
  18. * @package app\jobs\order
  19. */
  20. class AutoTakeOrderJob extends BaseJobs
  21. {
  22. use QueueTrait;
  23. /**
  24. * @return string
  25. */
  26. protected static function queueName()
  27. {
  28. return 'CRMEB_PRO_TASK';
  29. }
  30. /**
  31. * @param $where
  32. * @param $page
  33. * @param $limit
  34. * @return bool
  35. */
  36. public function doJob($where, $page, $limit)
  37. {
  38. /** @var StoreOrderTakeServices $service */
  39. $service = app()->make(StoreOrderTakeServices::class);
  40. return $service->runAutoTakeOrder($where, $page, $limit);
  41. }
  42. }