mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-11 18:42:54 +00:00
perf(消息推送):代码优化
This commit is contained in:
parent
e8675c9c14
commit
7393fdf6cf
@ -1474,7 +1474,7 @@ class ProjectTask extends AbstractModel
|
||||
foreach ($array as $item) {
|
||||
$params = [
|
||||
'ignoreFd' => Request::header('fd'),
|
||||
'userid' => array_values($item),
|
||||
'userid' => $item['userid'],
|
||||
'msg' => [
|
||||
'type' => 'projectTask',
|
||||
'action' => $action,
|
||||
|
||||
@ -149,7 +149,7 @@ class PushTask extends AbstractTask
|
||||
if (!is_array($userid)) {
|
||||
$userid = [$userid];
|
||||
}
|
||||
foreach ($userid[0] as $uid) {
|
||||
foreach ($userid as $uid) {
|
||||
$row = WebSocket::select(['fd'])->whereUserid($uid)->pluck('fd');
|
||||
if ($row->isNotEmpty()) {
|
||||
$array = array_merge($array, $row->toArray());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user