AutoOrderUnpaidCancelJob.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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\StoreOrderServices;
  13. use crmeb\basic\BaseJobs;
  14. use crmeb\traits\QueueTrait;
  15. /**
  16. * 自动取消未支付订单
  17. * Class AutoOrderUnpaidCancelJob
  18. * @package app\jobs\order
  19. */
  20. class AutoOrderUnpaidCancelJob 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 $page
  32. * @param $limit
  33. * @return bool
  34. * @throws \think\db\exception\DataNotFoundException
  35. * @throws \think\db\exception\DbException
  36. * @throws \think\db\exception\ModelNotFoundException
  37. */
  38. public function doJob($page, $limit)
  39. {
  40. /** @var StoreOrderServices $service */
  41. $service = app()->make(StoreOrderServices::class);
  42. return $service->runOrderUnpaidCancel($page, $limit);
  43. }
  44. }