You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

StoreFinanceJob.php 904B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace app\jobs\store;
  3. use app\services\store\finance\StoreFinanceFlowServices;
  4. use crmeb\basic\BaseJobs;
  5. use crmeb\traits\QueueTrait;
  6. use think\facade\Log;
  7. /**
  8. * 门店资金流水记录
  9. * Class StoreFinanceJob
  10. * @package app\jobs
  11. */
  12. class StoreFinanceJob extends BaseJobs
  13. {
  14. use QueueTrait;
  15. /**
  16. * 门店流水
  17. * @param array $order
  18. * @param int $type
  19. * @param int $price
  20. * @return bool
  21. */
  22. public function doJob(array $order, int $type, $price = 0)
  23. {
  24. try {
  25. /** @var StoreFinanceFlowServices $storeFinanceFlowServices */
  26. $storeFinanceFlowServices = app()->make(StoreFinanceFlowServices::class);
  27. $storeFinanceFlowServices->setFinance($order, $type, $price);
  28. } catch (\Throwable $e) {
  29. Log::error('记录流水失败:' . $e->getMessage());
  30. }
  31. return true;
  32. }
  33. }