|
...
|
...
|
@@ -73,13 +73,24 @@ class SyncMobile extends Command |
|
|
|
'type'=>$userModel::TYPE_ONE
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
$info = $userModel->read(['mobile'=>$mobile,'project_id'=>5172],['id']);
|
|
|
|
if($info === false){
|
|
|
|
$userModel->add([
|
|
|
|
'mobile'=>$mobile,
|
|
|
|
'password'=>base64_encode(md5('123456')),
|
|
|
|
'project_id'=>5172,
|
|
|
|
'name'=>$mobile,
|
|
|
|
'type'=>$userModel::TYPE_ONE
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$saveData[] = '13083988828';
|
|
|
|
$managerModel = new Manage();
|
|
|
|
$mobileArr = $managerModel->selectField(['status'=>1],'mobile');
|
|
|
|
$saveData = array_values(array_unique(array_merge($saveData,$mobileArr)));
|
|
|
|
$userModel->edit(['status'=>1],['project_id'=>1,'mobile'=>['not in',$saveData]]);
|
|
|
|
$userModel->edit(['status'=>0],['project_id'=>1,'mobile'=>['in',$saveData]]);
|
|
|
|
$userModel->edit(['status'=>1],['project_id'=>[1,5172],'mobile'=>['not in',$saveData]]);
|
|
|
|
$userModel->edit(['status'=>0],['project_id'=>[1,5172],'mobile'=>['in',$saveData]]);
|
|
|
|
//跟对应的5172项目写一份
|
|
|
|
}
|
|
|
|
echo 'end.'.PHP_EOL;
|
|
|
|
return true;
|
...
|
...
|
|