4
This commit is contained in:
@@ -39,12 +39,24 @@ class OpenIm extends Command
|
||||
}
|
||||
return self::FAILURE;
|
||||
}
|
||||
private function change_user(InputInterface $input, OutputInterface $output):int{
|
||||
|
||||
$im = new \support\OpenImSdk\Client([
|
||||
'host' => 'http://127.0.0.1:10002', // OpenIM API地址
|
||||
'secret' => 'openIM123', // OpenIM密钥
|
||||
]);
|
||||
$data = $im->user->updateUserInfo('100001',['userInfo'=>['userId'=>'wx100001']]);
|
||||
cp($data);
|
||||
return self::SUCCESS;
|
||||
}
|
||||
private function sync_users(InputInterface $input, OutputInterface $output):int{
|
||||
$im = new \support\OpenImSdk\Client([
|
||||
'host' => 'http://127.0.0.1:10002', // OpenIM API地址
|
||||
'secret' => 'openIM123', // OpenIM密钥
|
||||
]);
|
||||
$data = $im->user->getAllUsersUid(1,1000);
|
||||
cp($data);
|
||||
return self::SUCCESS;
|
||||
$exsit_user_ids = Db::name('user')->whereIn('id',$data['userIDs'])->column('id');
|
||||
$not_exsit_user_ids =array_diff($data['userIDs'],$exsit_user_ids);
|
||||
if(count($not_exsit_user_ids)> 0){
|
||||
|
||||
Reference in New Issue
Block a user