WithdrawBalanceAuditFreeJob.php 947 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * Author: 芸众商城 www.yunzshop.com
  5. * Date: 2019/7/12
  6. * Time: 上午 10:00
  7. */
  8. namespace app\Jobs;
  9. use app\common\models\Withdraw;
  10. use app\frontend\modules\withdraw\services\BalanceAutomateAuditService;
  11. use Illuminate\Bus\Queueable;
  12. use Illuminate\Queue\SerializesModels;
  13. use Illuminate\Queue\InteractsWithQueue;
  14. use Illuminate\Contracts\Queue\ShouldQueue;
  15. class WithdrawBalanceAuditFreeJob implements ShouldQueue
  16. {
  17. use InteractsWithQueue, Queueable, SerializesModels;
  18. /**
  19. * @var Withdraw
  20. */
  21. private $withdrawModel;
  22. public function __construct(Withdraw $withdrawModel)
  23. {
  24. $this->withdrawModel = $withdrawModel;
  25. }
  26. /**
  27. * @throws \app\common\exceptions\ShopException
  28. */
  29. public function handle()
  30. {
  31. $automateAuditService = new BalanceAutomateAuditService($this->withdrawModel);
  32. $automateAuditService->freeAudit();
  33. }
  34. }