GpJob.php 435 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace crmeb\jobs;
  3. use app\models\store\StoreGp;
  4. use crmeb\interfaces\JobInterface;
  5. use think\queue\Job;
  6. class GpJob implements JobInterface
  7. {
  8. public function fire(Job $job, $data): void
  9. {
  10. if($this->doorder($data))
  11. $job->delete();
  12. else {
  13. $job->delete();
  14. }
  15. }
  16. public function doorder($data)
  17. {
  18. StoreGp::createGp($data);
  19. return true;
  20. }
  21. }