no message

This commit is contained in:
kuaifan
2025-04-24 08:57:43 +08:00
parent f5a343f358
commit eccb3e2825
6 changed files with 60 additions and 33 deletions
+15 -9
View File
@@ -2,6 +2,8 @@
namespace App\Tasks;
use App\Models\WebSocketDialogMsg;
use App\Models\WebSocketDialogUser;
use App\Module\ZincSearch\ZincSearchDialogMsg;
use Carbon\Carbon;
use Illuminate\Support\Facades\Cache;
@@ -26,19 +28,23 @@ class ZincSearchSyncTask extends AbstractTask
{
switch ($this->action) {
case 'sync':
// 同步聊天数据
ZincSearchDialogMsg::sync($this->data);
break;
case 'userCreated':
case 'userSync':
// 同步用户数据
ZincSearchDialogMsg::userSync($this->data, $this->action === 'userCreated');
// 同步消息数据
ZincSearchDialogMsg::sync(WebSocketDialogMsg::fillInstance($this->data));
break;
case 'delete':
// 删除消息数据
ZincSearchDialogMsg::delete(WebSocketDialogMsg::fillInstance($this->data));
break;
case 'userSync':
// 同步用户数据
ZincSearchDialogMsg::userSync(WebSocketDialogUser::fillInstance($this->data));
break;
case 'deleteUser':
// 删除用户数据
ZincSearchDialogMsg::delete($this->data);
ZincSearchDialogMsg::delete(WebSocketDialogUser::fillInstance($this->data));
break;
default: