51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Jobs;
|
||
|
|
|
||
|
|
use App\Services\UserService;
|
||
|
|
use Illuminate\Bus\Queueable;
|
||
|
|
use Illuminate\Queue\SerializesModels;
|
||
|
|
use Illuminate\Queue\InteractsWithQueue;
|
||
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||
|
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||
|
|
|
||
|
|
class ChangeUnionUser implements ShouldQueue
|
||
|
|
{
|
||
|
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||
|
|
|
||
|
|
protected $user;
|
||
|
|
protected $password;
|
||
|
|
protected $userService;
|
||
|
|
/**
|
||
|
|
* Create a new job instance.
|
||
|
|
*
|
||
|
|
* @return void
|
||
|
|
*/
|
||
|
|
public function __construct($user, $password)
|
||
|
|
{
|
||
|
|
$this->user = $user;
|
||
|
|
$this->password = $password;
|
||
|
|
$this->userService = new UserService();
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Execute the job.
|
||
|
|
*
|
||
|
|
* @return void
|
||
|
|
*/
|
||
|
|
public function handle()
|
||
|
|
{
|
||
|
|
// $mobile = $this->user->mobile;
|
||
|
|
// $password = $this->password;
|
||
|
|
// $uuid = $this->user->uuid;
|
||
|
|
// //创建基表账号
|
||
|
|
// $union_user = $this->userService->changeUnionUser($mobile,$password, $uuid);
|
||
|
|
// //绑定基表id
|
||
|
|
// if (!empty($union_user) && empty($this->user->uuid))
|
||
|
|
// {
|
||
|
|
// $this->user->uuid = $union_user->id;
|
||
|
|
// $this->user->save();
|
||
|
|
// }
|
||
|
|
}
|
||
|
|
}
|