|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @remark :
|
|
|
|
* @name :SyncManager.php
|
|
|
|
* @name :SyncMobile.php
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/12/25 15:00
|
|
...
|
...
|
@@ -10,11 +10,10 @@ |
|
|
|
namespace App\Console\Commands;
|
|
|
|
|
|
|
|
use App\Models\User\User;
|
|
|
|
use App\Services\ProjectServer;
|
|
|
|
use Illuminate\Console\Command;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
|
|
|
|
class SyncManager extends Command
|
|
|
|
class SyncMobile extends Command
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The name and signature of the console command.
|
|
...
|
...
|
@@ -40,7 +39,7 @@ class SyncManager extends Command |
|
|
|
public function handle(){
|
|
|
|
$url = 'https://www.quanqiusou.cn/extend_api/saas/get_phone.php';
|
|
|
|
$data = curlGet($url);//TODO::获取号码库
|
|
|
|
DB::connection('gl_mobile')->delete();
|
|
|
|
DB::table('gl_mobile')->delete();
|
|
|
|
$param = [];
|
|
|
|
$create_time = date('Y-m-d H:i:s');
|
|
|
|
foreach ($data as $v){
|
|
...
|
...
|
@@ -48,7 +47,7 @@ class SyncManager extends Command |
|
|
|
$param['created_at'] = $create_time;
|
|
|
|
}
|
|
|
|
if(!empty($param)){
|
|
|
|
DB::connection('gl_mobile')->insert($param);
|
|
|
|
DB::table('gl_mobile')->insert($param);
|
|
|
|
$userModel = new User();
|
|
|
|
try {
|
|
|
|
$userModel->edit(['status'=>1],['project_id'=>1,'mobile'=>['not in',$data]]);
|
...
|
...
|
|