MemberMaxRelatoinJob.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: dingran
  5. * Date: 2019/4/16
  6. * Time: 下午1:08
  7. */
  8. namespace app\Jobs;
  9. use app\common\models\member\ChildrenOfMember;
  10. use app\common\models\member\ParentOfMember;
  11. use app\common\services\member\MemberRelation;
  12. use Illuminate\Bus\Queueable;
  13. use Illuminate\Contracts\Queue\ShouldQueue;
  14. use Illuminate\Queue\InteractsWithQueue;
  15. use Illuminate\Queue\SerializesModels;
  16. class MemberMaxRelatoinJob implements ShouldQueue
  17. {
  18. use InteractsWithQueue, Queueable, SerializesModels;
  19. public $uniacid = 0;
  20. public function __construct($uniacid)
  21. {
  22. $this->uniacid = $uniacid;
  23. }
  24. public function handle()
  25. {
  26. \Log::debug('-----queue max-----', $this->uniacid);
  27. $uniacid = $this->uniacid;
  28. $parentMemberModle = new ParentOfMember();
  29. $childMemberModel = new ChildrenOfMember();
  30. $parentMemberModle->DeletedData($uniacid);
  31. $childMemberModel->DeletedData($uniacid);
  32. $member_relation = new MemberRelation();
  33. $member_relation->createParentOfMember($uniacid);
  34. }
  35. }