代码优化

This commit is contained in:
wong
2026-01-17 17:03:48 +08:00
parent 9b8f3b1b2b
commit bac66de046
2 changed files with 6 additions and 5 deletions

View File

@@ -27,7 +27,7 @@ class MessageController extends BaseController
}
}
$fromTime = $this->request->param('fromTime', date('Y-m-d 00:00:00', strtotime('-1 days')));
$fromTime = $this->request->param('fromTime', date('Y-m-d 00:00:00'));
$toTime = $this->request->param('toTime', date('Y-m-d 23:59:59'));
@@ -122,7 +122,7 @@ class MessageController extends BaseController
public function getMessageList()
{
// 获取授权token
$authorization = $this->authorization;
$authorization = trim($this->request->header('authorization', $this->authorization));
if (empty($authorization)) {
return errorJson('缺少授权信息');
}
@@ -182,6 +182,7 @@ class MessageController extends BaseController
{
// 获取授权token
$authorization = $this->authorization;
//$authorization = 'vIxE_SlpPqQLpG3maOL8VaPBDz_uoGqhK4HGR4VtxvtsjNkW9kP6RQicwsfX6lLXruq9UqyDV7wBU5iGT2OPv3t_GZKfVUv-PG_CL4zc6806GKhmT7QxFOXHLF0KH2VWlzVfo9i_MxsuPm9MqiuYwKDXKOpBwSemNL6vwYOrIkZBAcanG06rPEdSlrNcNyJiYrUpqZKDeQEgxE4o9WeYVczYLN8OS-p8Z57DXlVwW8CJCdLsFi7csBVT7uTreDJnAv7wraMRHB5FYs1U7vEmO9IbmsQhhdC1swMuz0kQIESr2zf11nBKEDEadMoH4HptIENXQQ';
if (empty($authorization)) {
if($isInner){
return json_encode(['code'=>500,'msg'=>'缺少授权信息']);
@@ -190,7 +191,7 @@ class MessageController extends BaseController
}
}
$fromTime = $this->request->param('fromTime', date('Y-m-d 00:00:00', strtotime('-1 days')));
$fromTime = $this->request->param('fromTime', date('Y-m-d 00:00:00'));
$toTime = $this->request->param('toTime', date('Y-m-d 23:59:59'));
@@ -287,7 +288,7 @@ class MessageController extends BaseController
public function getChatroomMessages()
{
// 获取授权token
$authorization = $this->authorization;
$authorization = trim($this->request->header('authorization', $this->authorization));
if (empty($authorization)) {
return errorJson('缺少授权信息');
}

View File

@@ -13,7 +13,7 @@ class MessageChatroomListJob
/**
* 最大同步页数
*/
const MAX_SYNC_PAGES = 5;
const MAX_SYNC_PAGES = 1;
/**
* 队列任务处理