This commit is contained in:
2024-07-23 17:07:56 +08:00
parent 1179f37d8a
commit c21840eeb1

View File

@@ -136,8 +136,19 @@ class Reportty
->where('username',$user['username'])
->delete();
$client_id = input('client_id');
if(empty($client_id)){
return json(Tools::set_fail('client_id必须'));
}
//查询广播客户端id
$arr = Db::table('fa_device')
->where('username',$username)
->where('clientid','neq',$client_id)
->select();
$clientid_arr = array_column($arr,'clientid');
$json = Tools::wss_json_ok('Reportty/createReport','ok',['flow_code'=>'create_report_end']);
Gateway::sendToAll($json);
Gateway::sendToAll($json,$clientid_arr);
return json(Tools::set_ok($res_content));
}