Browse Source

用户设置自动删除接口优化6

master
wanghongjun 7 months ago
parent
commit
1245152fc5
  1. 5
      app/common/task/UserClearMessage.php

5
app/common/task/UserClearMessage.php

@ -39,7 +39,8 @@ class UserClearMessage extends Task
{ {
//设置每天2点执行 //设置每天2点执行
// $this->dailyAt('02:00'); // $this->dailyAt('02:00');
$this->everyFiveMinutes(); // $this->everyFiveMinutes();
$this->everyMinute();
} }
/** /**
@ -73,8 +74,6 @@ class UserClearMessage extends Task
$whereMsg = [ $whereMsg = [
['create_time', '<', $time], ['create_time', '<', $time],
['is_group', '=', 0], ['is_group', '=', 0],
['from_user', '=', $form_user],
['to_user', '=', $to_user],
['chat_identify', '=', $chat_identify] ['chat_identify', '=', $chat_identify]
]; ];
$msgRes = Message::where($whereMsg)->select(); $msgRes = Message::where($whereMsg)->select();

Loading…
Cancel
Save