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