定时任务提交
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\common\model\CompanyAccountModel;
|
||||
use app\api\model\CompanyAccountModel;
|
||||
use think\facade\Request;
|
||||
|
||||
class AccountController extends BaseController
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\common\model\UserModel;
|
||||
use app\common\model\UserTokenModel;
|
||||
use think\Controller;
|
||||
use think\facade\Env;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\common\model\DeviceModel;
|
||||
use app\api\model\DeviceModel;
|
||||
use think\facade\Request;
|
||||
use think\facade\Env;
|
||||
use Endroid\QrCode\QrCode;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\common\model\FriendTaskModel;
|
||||
use app\api\model\FriendTaskModel;
|
||||
use think\facade\Request;
|
||||
|
||||
class FriendTaskController extends BaseController
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\common\model\CompanyAccountModel;
|
||||
use app\api\model\CompanyAccountModel;
|
||||
use think\facade\Env;
|
||||
use think\Response;
|
||||
|
||||
|
||||
@@ -100,12 +100,13 @@ class WebSocketController extends BaseController
|
||||
$result = json_encode($result);
|
||||
$this->client->send($result);
|
||||
$message = $this->client->receive();
|
||||
$message = json_decode($message, 1);
|
||||
//关闭WS链接
|
||||
$this->client->close();
|
||||
Log::write('WS个人消息发送');
|
||||
$this->success('消息成功发送', json_decode($message, 1), 200);
|
||||
//Log::write('WS个人消息发送');
|
||||
successJson($message, '消息成功发送');
|
||||
} else {
|
||||
$this->error('非法请求');
|
||||
errorJson('非法请求');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,17 +161,16 @@ class WebSocketController extends BaseController
|
||||
$message = $this->client->receive();
|
||||
//关闭WS链接
|
||||
$this->client->close();
|
||||
Log::write('WS群消息发送');
|
||||
Log::write($message);
|
||||
//Log::write('WS群消息发送');
|
||||
//Log::write($message);
|
||||
$message = json_decode($message, 1);
|
||||
} catch (\Exception $e) {
|
||||
$msg = $e->getMessage();
|
||||
}
|
||||
|
||||
$this->success($msg, $message, 200);
|
||||
successJson($message,$msg);
|
||||
|
||||
} else {
|
||||
$this->error('非法请求');
|
||||
errorJson('非法请求');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,15 +224,14 @@ class WebSocketController extends BaseController
|
||||
$message = $this->client->receive();
|
||||
//关闭WS链接
|
||||
$this->client->close();
|
||||
Log::write('WS群消息发送');
|
||||
Log::write($message);
|
||||
//Log::write('WS群消息发送');
|
||||
//Log::write($message);
|
||||
$message = json_decode($message, 1);
|
||||
} catch (\Exception $e) {
|
||||
$msg = $e->getMessage();
|
||||
}
|
||||
|
||||
$this->success($msg, $message, 200);
|
||||
|
||||
successJson($message,$msg);
|
||||
}
|
||||
|
||||
|
||||
@@ -274,10 +273,10 @@ class WebSocketController extends BaseController
|
||||
"seq" => time(),
|
||||
];
|
||||
$params = json_encode($params);
|
||||
Log::write('WS获取朋友圈信息参数:' . json_encode($params, 256));
|
||||
//Log::write('WS获取朋友圈信息参数:' . json_encode($params, 256));
|
||||
$this->client->send($params);
|
||||
$message = $this->client->receive();
|
||||
Log::write('WS获取朋友圈信息成功,结果:' . $message);
|
||||
//Log::write('WS获取朋友圈信息成功,结果:' . $message);
|
||||
$message = json_decode($message, 1);
|
||||
|
||||
// 存储朋友圈数据到数据库
|
||||
@@ -290,9 +289,10 @@ class WebSocketController extends BaseController
|
||||
} catch (\Exception $e) {
|
||||
$msg = $e->getMessage();
|
||||
}
|
||||
$this->success($msg, $message, 200);
|
||||
|
||||
successJson($message,$msg);
|
||||
} else {
|
||||
$this->error('非法请求');
|
||||
errorJson('非法请求');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,10 +348,10 @@ class WebSocketController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
Log::write('朋友圈数据已存入数据库,共' . count($momentList) . '条');
|
||||
//Log::write('朋友圈数据已存入数据库,共' . count($momentList) . '条');
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Log::write('保存朋友圈数据失败:' . $e->getMessage(), 'error');
|
||||
//Log::write('保存朋友圈数据失败:' . $e->getMessage(), 'error');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -396,15 +396,16 @@ class WebSocketController extends BaseController
|
||||
$params = json_encode($params);
|
||||
$this->client->send($params);
|
||||
$message = $this->client->receive();
|
||||
Log::write('WS获取朋友圈图片/视频链接成功,结果:' . json_encode($message, 256));
|
||||
//Log::write('WS获取朋友圈图片/视频链接成功,结果:' . json_encode($message, 256));
|
||||
//关闭WS链接
|
||||
$this->client->close();
|
||||
} catch (\Exception $e) {
|
||||
$msg = $e->getMessage();
|
||||
}
|
||||
$this->success($msg, $message, 200);
|
||||
|
||||
successJson($message,$msg);
|
||||
} else {
|
||||
$this->error('非法请求');
|
||||
errorJson('非法请求');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\common\model\WechatChatroomModel;
|
||||
use app\common\model\WechatChatroomMemberModel;
|
||||
use app\api\model\WechatChatroomModel;
|
||||
use app\api\model\WechatChatroomMemberModel;
|
||||
use app\job\WechatChatroomJob;
|
||||
use think\facade\Request;
|
||||
|
||||
class WechatChatroomController extends BaseController
|
||||
@@ -180,4 +181,32 @@ class WechatChatroomController extends BaseController
|
||||
WechatChatroomMemberModel::create($data);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步微信群聊数据
|
||||
* 此方法用于手动触发微信群聊数据同步任务
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function syncChatrooms()
|
||||
{
|
||||
try {
|
||||
// 获取请求参数
|
||||
$pageIndex = $this->request->param('pageIndex', 0);
|
||||
$pageSize = $this->request->param('pageSize', 100);
|
||||
$keyword = $this->request->param('keyword', '');
|
||||
$wechatAccountKeyword = $this->request->param('wechatAccountKeyword', '');
|
||||
$isDeleted = $this->request->param('isDeleted', '');
|
||||
|
||||
// 添加同步任务到队列
|
||||
$result = WechatChatroomJob::addSyncTask($pageIndex, $pageSize, $keyword, $wechatAccountKeyword, $isDeleted);
|
||||
|
||||
if ($result) {
|
||||
return successJson([], '微信群聊同步任务已添加到队列');
|
||||
} else {
|
||||
return errorJson('添加同步任务失败');
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return errorJson('添加同步任务异常:' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\common\model\WechatAccountModel;
|
||||
use app\api\model\WechatAccountModel;
|
||||
|
||||
class WechatController extends BaseController
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\common\model\WechatFriendModel;
|
||||
use app\api\model\WechatFriendModel;
|
||||
use think\facade\Request;
|
||||
|
||||
class WechatFriendController extends BaseController
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model;
|
||||
namespace app\api\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model;
|
||||
namespace app\api\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model;
|
||||
namespace app\api\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model;
|
||||
namespace app\api\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model;
|
||||
namespace app\api\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model;
|
||||
namespace app\api\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
10
Server/application/api/model/WechatFriendModel.php
Normal file
10
Server/application/api/model/WechatFriendModel.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class WechatFriendModel extends Model
|
||||
{
|
||||
|
||||
}
|
||||
@@ -10,6 +10,11 @@
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
'test' => 'app\common\command\TestCommand',
|
||||
'device:list' => 'app\common\command\DeviceListCommand',
|
||||
'device:list' => 'app\command\DeviceListCommand', // 设备列表
|
||||
'wechatFriends:list' => 'app\command\WechatFriendCommand', // 微信好友列表
|
||||
'wechatChatroom:list' => 'app\command\WechatChatroomCommand', // 微信群列表
|
||||
'friendTask:list' => 'app\command\FriendTaskCommand', // 添加好友任务列表
|
||||
'wechatList:list' => 'app\command\WechatListCommand', // 微信客服列表
|
||||
'account:list' => 'app\command\AccountListCommand', // 公司账号列表
|
||||
'sync:wechat:chatrooms' => 'app\command\SyncWechatChatrooms', // 同步微信群聊数据
|
||||
];
|
||||
|
||||
57
Server/application/command/AccountListCommand.php
Normal file
57
Server/application/command/AccountListCommand.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace app\command;
|
||||
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
use think\facade\Log;
|
||||
use think\Queue;
|
||||
use app\job\AccountListJob;
|
||||
|
||||
class AccountListCommand extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('account:list')
|
||||
->setDescription('获取公司账号列表,并根据分页自动处理下一页');
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
$output->writeln('开始处理公司账号列表任务...');
|
||||
|
||||
try {
|
||||
// 初始页码
|
||||
$pageIndex = 0;
|
||||
$pageSize = 100; // 每页获取100条记录
|
||||
|
||||
// 将第一页任务添加到队列
|
||||
$this->addToQueue($pageIndex, $pageSize);
|
||||
|
||||
$output->writeln('公司账号列表任务已添加到队列');
|
||||
} catch (\Exception $e) {
|
||||
Log::error('公司账号列表任务添加失败:' . $e->getMessage());
|
||||
$output->writeln('公司账号列表任务添加失败:' . $e->getMessage());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加任务到队列
|
||||
* @param int $pageIndex 页码
|
||||
* @param int $pageSize 每页大小
|
||||
*/
|
||||
protected function addToQueue($pageIndex, $pageSize)
|
||||
{
|
||||
$data = [
|
||||
'pageIndex' => $pageIndex,
|
||||
'pageSize' => $pageSize
|
||||
];
|
||||
|
||||
// 添加到队列,设置任务名为 account_list
|
||||
Queue::push(AccountListJob::class, $data, 'account_list');
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\command;
|
||||
namespace app\command;
|
||||
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
@@ -9,7 +9,7 @@ use think\facade\Log;
|
||||
use think\Queue;
|
||||
use app\job\DeviceListJob;
|
||||
|
||||
class DeviceListCommand extends BaseCommand
|
||||
class DeviceListCommand extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
57
Server/application/command/FriendTaskCommand.php
Normal file
57
Server/application/command/FriendTaskCommand.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace app\command;
|
||||
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
use think\facade\Log;
|
||||
use think\Queue;
|
||||
use app\job\FriendTaskJob;
|
||||
|
||||
class FriendTaskCommand extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('friend:task')
|
||||
->setDescription('获取添加好友认为列表,并根据分页自动处理下一页');
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
$output->writeln('开始处理添加好友任务...');
|
||||
|
||||
try {
|
||||
// 初始页码
|
||||
$pageIndex = 0;
|
||||
$pageSize = 100; // 每页获取100条记录
|
||||
|
||||
// 将第一页任务添加到队列
|
||||
$this->addToQueue($pageIndex, $pageSize);
|
||||
|
||||
$output->writeln('添加好友任务已添加到队列');
|
||||
} catch (\Exception $e) {
|
||||
Log::error('添加好友任务添加失败:' . $e->getMessage());
|
||||
$output->writeln('添加好友任务添加失败:' . $e->getMessage());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加任务到队列
|
||||
* @param int $pageIndex 页码
|
||||
* @param int $pageSize 每页大小
|
||||
*/
|
||||
protected function addToQueue($pageIndex, $pageSize)
|
||||
{
|
||||
$data = [
|
||||
'pageIndex' => $pageIndex,
|
||||
'pageSize' => $pageSize
|
||||
];
|
||||
|
||||
// 添加到队列,设置任务名为 friend_task
|
||||
Queue::push(FriendTaskJob::class, $data, 'friend_task');
|
||||
}
|
||||
}
|
||||
57
Server/application/command/WechatChatroomCommand.php
Normal file
57
Server/application/command/WechatChatroomCommand.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace app\command;
|
||||
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
use think\facade\Log;
|
||||
use think\Queue;
|
||||
use app\job\WechatChatroomJob;
|
||||
|
||||
class WechatChatroomCommand extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('wechatChatroom:list')
|
||||
->setDescription('获取微信聊天室列表,并根据分页自动处理下一页');
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
$output->writeln('开始处理微信聊天室列表任务...');
|
||||
|
||||
try {
|
||||
// 初始页码
|
||||
$pageIndex = 0;
|
||||
$pageSize = 100; // 每页获取100条记录
|
||||
|
||||
// 将第一页任务添加到队列
|
||||
$this->addToQueue($pageIndex, $pageSize);
|
||||
|
||||
$output->writeln('微信聊天室列表任务已添加到队列');
|
||||
} catch (\Exception $e) {
|
||||
Log::error('微信聊天室列表任务添加失败:' . $e->getMessage());
|
||||
$output->writeln('微信聊天室列表任务添加失败:' . $e->getMessage());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加任务到队列
|
||||
* @param int $pageIndex 页码
|
||||
* @param int $pageSize 每页大小
|
||||
*/
|
||||
protected function addToQueue($pageIndex, $pageSize)
|
||||
{
|
||||
$data = [
|
||||
'pageIndex' => $pageIndex,
|
||||
'pageSize' => $pageSize
|
||||
];
|
||||
|
||||
// 添加到队列,设置任务名为 device_list
|
||||
Queue::push(WechatChatroomJob::class, $data, 'wechat_chatroom');
|
||||
}
|
||||
}
|
||||
57
Server/application/command/WechatFriendCommand.php
Normal file
57
Server/application/command/WechatFriendCommand.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace app\command;
|
||||
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
use think\facade\Log;
|
||||
use think\Queue;
|
||||
use app\job\WechatFriendJob;
|
||||
|
||||
class WechatFriendCommand extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('wechatFriends:list')
|
||||
->setDescription('获微信列表,并根据分页自动处理下一页');
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
$output->writeln('开始处理微信列表任务...');
|
||||
|
||||
try {
|
||||
// 初始页码
|
||||
$pageIndex = 0;
|
||||
$pageSize = 100; // 每页获取100条记录
|
||||
|
||||
// 将第一页任务添加到队列
|
||||
$this->addToQueue($pageIndex, $pageSize);
|
||||
|
||||
$output->writeln('微信列表任务已添加到队列');
|
||||
} catch (\Exception $e) {
|
||||
Log::error('微信列表任务添加失败:' . $e->getMessage());
|
||||
$output->writeln('微信列表任务添加失败:' . $e->getMessage());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加任务到队列
|
||||
* @param int $pageIndex 页码
|
||||
* @param int $pageSize 每页大小
|
||||
*/
|
||||
protected function addToQueue($pageIndex, $pageSize)
|
||||
{
|
||||
$data = [
|
||||
'pageIndex' => $pageIndex,
|
||||
'pageSize' => $pageSize
|
||||
];
|
||||
|
||||
// 添加到队列,设置任务名为 wechat_friends
|
||||
Queue::push(WechatFriendJob::class, $data, 'wechat_friends');
|
||||
}
|
||||
}
|
||||
57
Server/application/command/WechatListCommand.php
Normal file
57
Server/application/command/WechatListCommand.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace app\command;
|
||||
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
use think\facade\Log;
|
||||
use think\Queue;
|
||||
use app\job\WechatListJob;
|
||||
|
||||
class WechatListCommand extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('wechat:list')
|
||||
->setDescription('获取微信客服列表,并根据分页自动处理下一页');
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
$output->writeln('开始处理微信客服列表任务...');
|
||||
|
||||
try {
|
||||
// 初始页码
|
||||
$pageIndex = 0;
|
||||
$pageSize = 100; // 每页获取100条记录
|
||||
|
||||
// 将第一页任务添加到队列
|
||||
$this->addToQueue($pageIndex, $pageSize);
|
||||
|
||||
$output->writeln('微信客服列表任务已添加到队列');
|
||||
} catch (\Exception $e) {
|
||||
Log::error('微信客服列表任务添加失败:' . $e->getMessage());
|
||||
$output->writeln('微信客服列表任务添加失败:' . $e->getMessage());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加任务到队列
|
||||
* @param int $pageIndex 页码
|
||||
* @param int $pageSize 每页大小
|
||||
*/
|
||||
protected function addToQueue($pageIndex, $pageSize)
|
||||
{
|
||||
$data = [
|
||||
'pageIndex' => $pageIndex,
|
||||
'pageSize' => $pageSize
|
||||
];
|
||||
|
||||
// 添加到队列,设置任务名为 wechat_list
|
||||
Queue::push(WechatListJob::class, $data, 'wechat_list');
|
||||
}
|
||||
}
|
||||
@@ -104,7 +104,7 @@ if (!function_exists('setHeader')) {
|
||||
if (!function_exists('errorJson')) {
|
||||
function errorJson($error = '', $code = 500)
|
||||
{
|
||||
return json([
|
||||
return json_encode([
|
||||
'code' => $code,
|
||||
'msg' => $error,
|
||||
]);
|
||||
@@ -115,7 +115,7 @@ if (!function_exists('errorJson')) {
|
||||
if (!function_exists('successJson')) {
|
||||
function successJson($data = [] ,$msg = '操作成功', $code = 200)
|
||||
{
|
||||
return json([
|
||||
return json_encode([
|
||||
'data' => $data,
|
||||
'code' => $code,
|
||||
'msg' => $msg,
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\command;
|
||||
|
||||
use think\console\Command;
|
||||
|
||||
class BaseCommand extends Command {
|
||||
|
||||
protected $logSave = 1; // 1: 文件,2: 打印
|
||||
|
||||
/**
|
||||
* 写入日志
|
||||
*
|
||||
* @param $type
|
||||
* @param $message
|
||||
*/
|
||||
public function log($type, $message) {
|
||||
$data = '[' . date('Y-m-d H:i:s') . ']' . PHP_EOL;
|
||||
$data .= '[' . $type . '] ' . $message . PHP_EOL . PHP_EOL;
|
||||
|
||||
if ($this->logSave === 1) {
|
||||
$name = get_class($this);
|
||||
$name = substr($name, strrpos($name, '\\') + 1);
|
||||
$file = ROOT_PATH . DS . 'runtime' . DS . $name . '_' . date('Ymd') . '.txt';
|
||||
|
||||
file_put_contents($file, $data, FILE_APPEND);
|
||||
} else {
|
||||
echo $data;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\command;
|
||||
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
|
||||
class TestCommand extends BaseCommand {
|
||||
|
||||
protected $logSave = 2;
|
||||
|
||||
protected function configure() {
|
||||
$this->setName('Test')
|
||||
->setDescription('command test.');
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output) {
|
||||
print_r('hello test.');
|
||||
}
|
||||
}
|
||||
123
Server/application/job/AccountListJob.php
Normal file
123
Server/application/job/AccountListJob.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
namespace app\job;
|
||||
|
||||
use think\queue\Job;
|
||||
use think\facade\Log;
|
||||
use think\Queue;
|
||||
use think\facade\Config;
|
||||
use app\api\controller\AccountController;
|
||||
use app\common\service\AuthService;
|
||||
|
||||
class AccountListJob
|
||||
{
|
||||
/**
|
||||
* 队列任务处理
|
||||
* @param Job $job 队列任务
|
||||
* @param array $data 任务数据
|
||||
* @return void
|
||||
*/
|
||||
public function fire(Job $job, $data)
|
||||
{
|
||||
try {
|
||||
// 如果任务执行成功后删除任务
|
||||
if ($this->processAccountList($data, $job->attempts())) {
|
||||
$job->delete();
|
||||
Log::info('公司账号列表任务执行成功,页码:' . $data['pageIndex']);
|
||||
} else {
|
||||
if ($job->attempts() > 3) {
|
||||
// 超过重试次数,删除任务
|
||||
Log::error('公司账号列表任务执行失败,已超过重试次数,页码:' . $data['pageIndex']);
|
||||
$job->delete();
|
||||
} else {
|
||||
// 任务失败,重新放回队列
|
||||
Log::warning('公司账号列表任务执行失败,重试次数:' . $job->attempts() . ',页码:' . $data['pageIndex']);
|
||||
$job->release(Config::get('queue.failed_delay', 10));
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
// 出现异常,记录日志
|
||||
Log::error('公司账号列表任务异常:' . $e->getMessage());
|
||||
if ($job->attempts() > 3) {
|
||||
$job->delete();
|
||||
} else {
|
||||
$job->release(Config::get('queue.failed_delay', 10));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理公司账号列表获取
|
||||
* @param array $data 任务数据
|
||||
* @param int $attempts 重试次数
|
||||
* @return bool
|
||||
*/
|
||||
protected function processAccountList($data, $attempts)
|
||||
{
|
||||
// 获取参数
|
||||
$pageIndex = isset($data['pageIndex']) ? $data['pageIndex'] : 0;
|
||||
$pageSize = isset($data['pageSize']) ? $data['pageSize'] : 100;
|
||||
|
||||
Log::info('开始获取公司账号列表,页码:' . $pageIndex . ',页大小:' . $pageSize);
|
||||
|
||||
// 实例化控制器
|
||||
$accountController = new AccountController();
|
||||
|
||||
// 构建请求参数
|
||||
$params = [
|
||||
'pageIndex' => $pageIndex,
|
||||
'pageSize' => $pageSize
|
||||
];
|
||||
|
||||
// 设置请求信息
|
||||
$request = request();
|
||||
$request->withGet($params);
|
||||
|
||||
// 获取系统授权信息
|
||||
$authorization = AuthService::getSystemAuthorization();
|
||||
if (empty($authorization)) {
|
||||
Log::error('获取系统授权信息失败');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 调用公司账号列表获取方法
|
||||
$result = $accountController->getlist($pageIndex,$pageSize,$authorization);
|
||||
$response = json_decode($result,true);
|
||||
|
||||
|
||||
// 判断是否成功
|
||||
if ($response['code'] == 200) {
|
||||
$data = $response['data'];
|
||||
|
||||
// 判断是否有下一页
|
||||
if (!empty($data) && count($data['results']) > 0) {
|
||||
// 有下一页,将下一页任务添加到队列
|
||||
$nextPageIndex = $pageIndex + 1;
|
||||
$this->addNextPageToQueue($nextPageIndex, $pageSize);
|
||||
Log::info('添加下一页任务到队列,页码:' . $nextPageIndex);
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
$errorMsg = isset($response['msg']) ? $response['msg'] : '未知错误';
|
||||
Log::error('获取公司账号列表失败:' . $errorMsg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加下一页任务到队列
|
||||
* @param int $pageIndex 页码
|
||||
* @param int $pageSize 每页大小
|
||||
*/
|
||||
protected function addNextPageToQueue($pageIndex, $pageSize)
|
||||
{
|
||||
$data = [
|
||||
'pageIndex' => $pageIndex,
|
||||
'pageSize' => $pageSize
|
||||
];
|
||||
|
||||
// 添加到队列,设置任务名为 account_list
|
||||
Queue::push(self::class, $data, 'account_list');
|
||||
}
|
||||
}
|
||||
123
Server/application/job/FriendTaskJob.php
Normal file
123
Server/application/job/FriendTaskJob.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
namespace app\job;
|
||||
|
||||
use think\queue\Job;
|
||||
use think\facade\Log;
|
||||
use think\Queue;
|
||||
use think\facade\Config;
|
||||
use app\api\controller\FriendTaskController;
|
||||
use app\common\service\AuthService;
|
||||
|
||||
class FriendTaskJob
|
||||
{
|
||||
/**
|
||||
* 队列任务处理
|
||||
* @param Job $job 队列任务
|
||||
* @param array $data 任务数据
|
||||
* @return void
|
||||
*/
|
||||
public function fire(Job $job, $data)
|
||||
{
|
||||
try {
|
||||
// 如果任务执行成功后删除任务
|
||||
if ($this->processFriendTask($data, $job->attempts())) {
|
||||
$job->delete();
|
||||
Log::info('添加好友任务执行成功,页码:' . $data['pageIndex']);
|
||||
} else {
|
||||
if ($job->attempts() > 3) {
|
||||
// 超过重试次数,删除任务
|
||||
Log::error('添加好友任务执行失败,已超过重试次数,页码:' . $data['pageIndex']);
|
||||
$job->delete();
|
||||
} else {
|
||||
// 任务失败,重新放回队列
|
||||
Log::warning('添加好友任务执行失败,重试次数:' . $job->attempts() . ',页码:' . $data['pageIndex']);
|
||||
$job->release(Config::get('queue.failed_delay', 10));
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
// 出现异常,记录日志
|
||||
Log::error('添加好友任务异常:' . $e->getMessage());
|
||||
if ($job->attempts() > 3) {
|
||||
$job->delete();
|
||||
} else {
|
||||
$job->release(Config::get('queue.failed_delay', 10));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理添加好友任务获取
|
||||
* @param array $data 任务数据
|
||||
* @param int $attempts 重试次数
|
||||
* @return bool
|
||||
*/
|
||||
protected function processFriendTask($data, $attempts)
|
||||
{
|
||||
// 获取参数
|
||||
$pageIndex = isset($data['pageIndex']) ? $data['pageIndex'] : 0;
|
||||
$pageSize = isset($data['pageSize']) ? $data['pageSize'] : 100;
|
||||
|
||||
Log::info('开始获取添加好友任务,页码:' . $pageIndex . ',页大小:' . $pageSize);
|
||||
|
||||
// 实例化控制器
|
||||
$friendTaskController = new FriendTaskController();
|
||||
|
||||
// 构建请求参数
|
||||
$params = [
|
||||
'pageIndex' => $pageIndex,
|
||||
'pageSize' => $pageSize
|
||||
];
|
||||
|
||||
// 设置请求信息
|
||||
$request = request();
|
||||
$request->withGet($params);
|
||||
|
||||
// 获取系统授权信息
|
||||
$authorization = AuthService::getSystemAuthorization();
|
||||
if (empty($authorization)) {
|
||||
Log::error('获取系统授权信息失败');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 调用添加好友任务获取方法
|
||||
$result = $friendTaskController->getlist($pageIndex,$pageSize,$authorization);
|
||||
$response = json_decode($result,true);
|
||||
|
||||
|
||||
// 判断是否成功
|
||||
if ($response['code'] == 200) {
|
||||
$data = $response['data'];
|
||||
|
||||
// 判断是否有下一页
|
||||
if (!empty($data) && count($data['results']) > 0) {
|
||||
// 有下一页,将下一页任务添加到队列
|
||||
$nextPageIndex = $pageIndex + 1;
|
||||
$this->addNextPageToQueue($nextPageIndex, $pageSize);
|
||||
Log::info('添加下一页任务到队列,页码:' . $nextPageIndex);
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
$errorMsg = isset($response['msg']) ? $response['msg'] : '未知错误';
|
||||
Log::error('获取添加好友任务失败:' . $errorMsg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加下一页任务到队列
|
||||
* @param int $pageIndex 页码
|
||||
* @param int $pageSize 每页大小
|
||||
*/
|
||||
protected function addNextPageToQueue($pageIndex, $pageSize)
|
||||
{
|
||||
$data = [
|
||||
'pageIndex' => $pageIndex,
|
||||
'pageSize' => $pageSize
|
||||
];
|
||||
|
||||
// 添加到队列,设置任务名为 friend_task
|
||||
Queue::push(self::class, $data, 'friend_task');
|
||||
}
|
||||
}
|
||||
123
Server/application/job/WechatChatroomJob.php
Normal file
123
Server/application/job/WechatChatroomJob.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
namespace app\job;
|
||||
|
||||
use think\queue\Job;
|
||||
use think\facade\Log;
|
||||
use think\Queue;
|
||||
use think\facade\Config;
|
||||
use app\api\controller\WechatChatroomController;
|
||||
use app\common\service\AuthService;
|
||||
|
||||
class WechatChatroomJob
|
||||
{
|
||||
/**
|
||||
* 队列任务处理
|
||||
* @param Job $job 队列任务
|
||||
* @param array $data 任务数据
|
||||
* @return void
|
||||
*/
|
||||
public function fire(Job $job, $data)
|
||||
{
|
||||
try {
|
||||
// 如果任务执行成功后删除任务
|
||||
if ($this->processWechatChatroomList($data, $job->attempts())) {
|
||||
$job->delete();
|
||||
Log::info('微信群列表任务执行成功,页码:' . $data['pageIndex']);
|
||||
} else {
|
||||
if ($job->attempts() > 3) {
|
||||
// 超过重试次数,删除任务
|
||||
Log::error('微信群列表任务执行失败,已超过重试次数,页码:' . $data['pageIndex']);
|
||||
$job->delete();
|
||||
} else {
|
||||
// 任务失败,重新放回队列
|
||||
Log::warning('微信群列表任务执行失败,重试次数:' . $job->attempts() . ',页码:' . $data['pageIndex']);
|
||||
$job->release(Config::get('queue.failed_delay', 10));
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
// 出现异常,记录日志
|
||||
Log::error('微信群列表任务异常:' . $e->getMessage());
|
||||
if ($job->attempts() > 3) {
|
||||
$job->delete();
|
||||
} else {
|
||||
$job->release(Config::get('queue.failed_delay', 10));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理微信群列表获取
|
||||
* @param array $data 任务数据
|
||||
* @param int $attempts 重试次数
|
||||
* @return bool
|
||||
*/
|
||||
protected function processWechatChatroomList($data, $attempts)
|
||||
{
|
||||
// 获取参数
|
||||
$pageIndex = isset($data['pageIndex']) ? $data['pageIndex'] : 0;
|
||||
$pageSize = isset($data['pageSize']) ? $data['pageSize'] : 100;
|
||||
|
||||
Log::info('开始获取微信群列表,页码:' . $pageIndex . ',页大小:' . $pageSize);
|
||||
|
||||
// 实例化控制器
|
||||
$wechatChatroomController = new WechatChatroomController();
|
||||
|
||||
// 构建请求参数
|
||||
$params = [
|
||||
'pageIndex' => $pageIndex,
|
||||
'pageSize' => $pageSize
|
||||
];
|
||||
|
||||
// 设置请求信息
|
||||
$request = request();
|
||||
$request->withGet($params);
|
||||
|
||||
// 获取系统授权信息
|
||||
$authorization = AuthService::getSystemAuthorization();
|
||||
if (empty($authorization)) {
|
||||
Log::error('获取系统授权信息失败');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 调用设备列表获取方法
|
||||
$result = $wechatChatroomController->getlist($pageIndex,$pageSize,$authorization);
|
||||
$response = json_decode($result,true);
|
||||
|
||||
|
||||
// 判断是否成功
|
||||
if ($response['code'] == 200) {
|
||||
$data = $response['data'];
|
||||
|
||||
// 判断是否有下一页
|
||||
if (!empty($data) && count($data['results']) > 0) {
|
||||
// 有下一页,将下一页任务添加到队列
|
||||
$nextPageIndex = $pageIndex + 1;
|
||||
$this->addNextPageToQueue($nextPageIndex, $pageSize);
|
||||
Log::info('添加下一页任务到队列,页码:' . $nextPageIndex);
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
$errorMsg = isset($response['msg']) ? $response['msg'] : '未知错误';
|
||||
Log::error('获取微信群列表失败:' . $errorMsg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加下一页任务到队列
|
||||
* @param int $pageIndex 页码
|
||||
* @param int $pageSize 每页大小
|
||||
*/
|
||||
protected function addNextPageToQueue($pageIndex, $pageSize)
|
||||
{
|
||||
$data = [
|
||||
'pageIndex' => $pageIndex,
|
||||
'pageSize' => $pageSize
|
||||
];
|
||||
|
||||
// 添加到队列,设置任务名为 wechat_chatroom
|
||||
Queue::push(self::class, $data, 'wechat_chatroom');
|
||||
}
|
||||
}
|
||||
123
Server/application/job/WechatFriendJob.php
Normal file
123
Server/application/job/WechatFriendJob.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
namespace app\job;
|
||||
|
||||
use think\queue\Job;
|
||||
use think\facade\Log;
|
||||
use think\Queue;
|
||||
use think\facade\Config;
|
||||
use app\api\controller\WechatFriendController;
|
||||
use app\common\service\AuthService;
|
||||
|
||||
class WechatFriendJob
|
||||
{
|
||||
/**
|
||||
* 队列任务处理
|
||||
* @param Job $job 队列任务
|
||||
* @param array $data 任务数据
|
||||
* @return void
|
||||
*/
|
||||
public function fire(Job $job, $data)
|
||||
{
|
||||
try {
|
||||
// 如果任务执行成功后删除任务
|
||||
if ($this->processWechatFriendList($data, $job->attempts())) {
|
||||
$job->delete();
|
||||
Log::info('微信列表任务执行成功,页码:' . $data['pageIndex']);
|
||||
} else {
|
||||
if ($job->attempts() > 3) {
|
||||
// 超过重试次数,删除任务
|
||||
Log::error('微信列表任务执行失败,已超过重试次数,页码:' . $data['pageIndex']);
|
||||
$job->delete();
|
||||
} else {
|
||||
// 任务失败,重新放回队列
|
||||
Log::warning('微信列表任务执行失败,重试次数:' . $job->attempts() . ',页码:' . $data['pageIndex']);
|
||||
$job->release(Config::get('queue.failed_delay', 10));
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
// 出现异常,记录日志
|
||||
Log::error('微信列表任务异常:' . $e->getMessage());
|
||||
if ($job->attempts() > 3) {
|
||||
$job->delete();
|
||||
} else {
|
||||
$job->release(Config::get('queue.failed_delay', 10));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理微信列表获取
|
||||
* @param array $data 任务数据
|
||||
* @param int $attempts 重试次数
|
||||
* @return bool
|
||||
*/
|
||||
protected function processWechatFriendList($data, $attempts)
|
||||
{
|
||||
// 获取参数
|
||||
$pageIndex = isset($data['pageIndex']) ? $data['pageIndex'] : 0;
|
||||
$pageSize = isset($data['pageSize']) ? $data['pageSize'] : 100;
|
||||
|
||||
Log::info('开始获取微信列表,页码:' . $pageIndex . ',页大小:' . $pageSize);
|
||||
|
||||
// 实例化控制器
|
||||
$wechatFriendController = new WechatFriendController();
|
||||
|
||||
// 构建请求参数
|
||||
$params = [
|
||||
'pageIndex' => $pageIndex,
|
||||
'pageSize' => $pageSize
|
||||
];
|
||||
|
||||
// 设置请求信息
|
||||
$request = request();
|
||||
$request->withGet($params);
|
||||
|
||||
// 获取系统授权信息
|
||||
$authorization = AuthService::getSystemAuthorization();
|
||||
if (empty($authorization)) {
|
||||
Log::error('获取系统授权信息失败');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 调用设备列表获取方法
|
||||
$result = $wechatFriendController->getlist($pageIndex,$pageSize,$authorization);
|
||||
$response = json_decode($result,true);
|
||||
|
||||
|
||||
// 判断是否成功
|
||||
if ($response['code'] == 200) {
|
||||
$data = $response['data'];
|
||||
|
||||
// 判断是否有下一页
|
||||
if (!empty($data) && count($data['results']) > 0) {
|
||||
// 有下一页,将下一页任务添加到队列
|
||||
$nextPageIndex = $pageIndex + 1;
|
||||
$this->addNextPageToQueue($nextPageIndex, $pageSize);
|
||||
Log::info('添加下一页任务到队列,页码:' . $nextPageIndex);
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
$errorMsg = isset($response['msg']) ? $response['msg'] : '未知错误';
|
||||
Log::error('获取微信列表失败:' . $errorMsg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加下一页任务到队列
|
||||
* @param int $pageIndex 页码
|
||||
* @param int $pageSize 每页大小
|
||||
*/
|
||||
protected function addNextPageToQueue($pageIndex, $pageSize)
|
||||
{
|
||||
$data = [
|
||||
'pageIndex' => $pageIndex,
|
||||
'pageSize' => $pageSize
|
||||
];
|
||||
|
||||
// 添加到队列,设置任务名为 wechat_friends
|
||||
Queue::push(self::class, $data, 'wechat_friends');
|
||||
}
|
||||
}
|
||||
123
Server/application/job/WechatListJob.php
Normal file
123
Server/application/job/WechatListJob.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
namespace app\job;
|
||||
|
||||
use think\queue\Job;
|
||||
use think\facade\Log;
|
||||
use think\Queue;
|
||||
use think\facade\Config;
|
||||
use app\api\controller\WechatController;
|
||||
use app\common\service\AuthService;
|
||||
|
||||
class WechatListJob
|
||||
{
|
||||
/**
|
||||
* 队列任务处理
|
||||
* @param Job $job 队列任务
|
||||
* @param array $data 任务数据
|
||||
* @return void
|
||||
*/
|
||||
public function fire(Job $job, $data)
|
||||
{
|
||||
try {
|
||||
// 如果任务执行成功后删除任务
|
||||
if ($this->processWechatList($data, $job->attempts())) {
|
||||
$job->delete();
|
||||
Log::info('微信客服列表任务执行成功,页码:' . $data['pageIndex']);
|
||||
} else {
|
||||
if ($job->attempts() > 3) {
|
||||
// 超过重试次数,删除任务
|
||||
Log::error('微信客服列表任务执行失败,已超过重试次数,页码:' . $data['pageIndex']);
|
||||
$job->delete();
|
||||
} else {
|
||||
// 任务失败,重新放回队列
|
||||
Log::warning('微信客服列表任务执行失败,重试次数:' . $job->attempts() . ',页码:' . $data['pageIndex']);
|
||||
$job->release(Config::get('queue.failed_delay', 10));
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
// 出现异常,记录日志
|
||||
Log::error('微信客服列表任务异常:' . $e->getMessage());
|
||||
if ($job->attempts() > 3) {
|
||||
$job->delete();
|
||||
} else {
|
||||
$job->release(Config::get('queue.failed_delay', 10));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理微信客服列表获取
|
||||
* @param array $data 任务数据
|
||||
* @param int $attempts 重试次数
|
||||
* @return bool
|
||||
*/
|
||||
protected function processWechatList($data, $attempts)
|
||||
{
|
||||
// 获取参数
|
||||
$pageIndex = isset($data['pageIndex']) ? $data['pageIndex'] : 0;
|
||||
$pageSize = isset($data['pageSize']) ? $data['pageSize'] : 100;
|
||||
|
||||
Log::info('开始获取微信客服列表,页码:' . $pageIndex . ',页大小:' . $pageSize);
|
||||
|
||||
// 实例化控制器
|
||||
$wechatController = new WechatController();
|
||||
|
||||
// 构建请求参数
|
||||
$params = [
|
||||
'pageIndex' => $pageIndex,
|
||||
'pageSize' => $pageSize
|
||||
];
|
||||
|
||||
// 设置请求信息
|
||||
$request = request();
|
||||
$request->withGet($params);
|
||||
|
||||
// 获取系统授权信息
|
||||
$authorization = AuthService::getSystemAuthorization();
|
||||
if (empty($authorization)) {
|
||||
Log::error('获取系统授权信息失败');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 调用设备列表获取方法
|
||||
$result = $wechatController->getlist($pageIndex,$pageSize,$authorization);
|
||||
$response = json_decode($result,true);
|
||||
|
||||
|
||||
// 判断是否成功
|
||||
if ($response['code'] == 200) {
|
||||
$data = $response['data'];
|
||||
|
||||
// 判断是否有下一页
|
||||
if (!empty($data) && count($data['results']) > 0) {
|
||||
// 有下一页,将下一页任务添加到队列
|
||||
$nextPageIndex = $pageIndex + 1;
|
||||
$this->addNextPageToQueue($nextPageIndex, $pageSize);
|
||||
Log::info('添加下一页任务到队列,页码:' . $nextPageIndex);
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
$errorMsg = isset($response['msg']) ? $response['msg'] : '未知错误';
|
||||
Log::error('获取微信客服列表失败:' . $errorMsg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加下一页任务到队列
|
||||
* @param int $pageIndex 页码
|
||||
* @param int $pageSize 每页大小
|
||||
*/
|
||||
protected function addNextPageToQueue($pageIndex, $pageSize)
|
||||
{
|
||||
$data = [
|
||||
'pageIndex' => $pageIndex,
|
||||
'pageSize' => $pageSize
|
||||
];
|
||||
|
||||
// 添加到队列,设置任务名为 wechat_list
|
||||
Queue::push(self::class, $data, 'wechat_list');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user