【触客宝】 队列添加限制,并优化整体流程

This commit is contained in:
wong
2025-04-23 18:13:01 +08:00
parent a6273e45ea
commit 16a723bcaf
11 changed files with 491 additions and 298 deletions

View File

@@ -20,7 +20,7 @@ class DeviceController extends BaseController
* @param bool $isJob 是否为定时任务调用
* @return \think\response\Json
*/
public function getlist($pageIndex = '',$pageSize = '',$isJob = false)
public function getlist($pageIndex = '',$pageSize = '',$isJob = false,$isDel = 0)
{
// 获取授权token
$authorization = trim($this->request->header('authorization', $this->authorization));
@@ -33,6 +33,14 @@ class DeviceController extends BaseController
}
try {
// 根据isDel设置对应的deleteType值
$deleteType = 'unDeleted'; // 默认值
if ($isDel == 1) {
$deleteType = 'deleted';
} elseif ($isDel == 2) {
$deleteType = 'deletedAndStop';
}
// 构建请求参数
$params = [
'accountId' => $this->request->param('accountId', ''),
@@ -41,7 +49,7 @@ class DeviceController extends BaseController
'groupId' => $this->request->param('groupId', ''),
'brand' => $this->request->param('brand', ''),
'model' => $this->request->param('model', ''),
'deleteType' => $this->request->param('deleteType', 'unDeleted'),
'deleteType' => $this->request->param('deleteType', $deleteType),
'operatingSystem' => $this->request->param('operatingSystem', ''),
'softwareVersion' => $this->request->param('softwareVersion', ''),
'phoneAppVersion' => $this->request->param('phoneAppVersion', ''),

View File

@@ -13,7 +13,7 @@ class WechatChatroomController extends BaseController
* 获取微信群聊列表
* @return \think\response\Json
*/
public function getlist($pageIndex = '',$pageSize = '',$isJob = false)
public function getlist($pageIndex = '',$pageSize = '',$isJob = false, $isDel = '')
{
// 获取授权token
$authorization = trim($this->request->header('authorization', $this->authorization));
@@ -26,11 +26,19 @@ class WechatChatroomController extends BaseController
}
try {
// 根据isDel设置对应的isDeleted值
$isDeleted = '';
if ($isDel === '0' || $isDel === 0) {
$isDeleted = false;
} elseif ($isDel === '1' || $isDel === 1) {
$isDeleted = true;
}
// 构建请求参数
$params = [
'keyword' => $this->request->param('keyword', ''),
'wechatAccountKeyword' => $this->request->param('wechatAccountKeyword', ''),
'isDeleted' => $this->request->param('isDeleted', ''),
'isDeleted' => $this->request->param('isDeleted', $isDeleted),
'allotAccountId' => $this->request->param('allotAccountId', ''),
'groupId' => $this->request->param('groupId', ''),
'wechatChatroomId' => $this->request->param('wechatChatroomId', 0),

View File

@@ -16,7 +16,7 @@ class WechatFriendController extends BaseController
* @param bool $isJob 是否为任务调用
* @return \think\response\Json
*/
public function getlist($pageIndex = '', $pageSize = '', $preFriendId = '', $isJob = false)
public function getlist($pageIndex = '', $pageSize = '', $preFriendId = '', $isJob = false,$isDel = '')
{
// 获取授权token
$authorization = trim($this->request->header('authorization', $this->authorization));
@@ -29,6 +29,14 @@ class WechatFriendController extends BaseController
}
try {
// 根据isDel设置对应的isDeleted值
$isDeleted = null; // 默认值
if ($isDel === '0' || $isDel === 0) {
$isDeleted = false;
} elseif ($isDel === '1' || $isDel === 1) {
$isDeleted = true;
}
// 构建请求参数
$params = [
'accountKeyword' => '',
@@ -39,7 +47,7 @@ class WechatFriendController extends BaseController
'extendFields' => '{}',
'gender' => '',
'groupId' => null,
'isDeleted' => null,
'isDeleted' => $isDeleted,
'isPass' => null,
'keyword' => input('keyword', ''),
'labels' => '[]',