流量分发优化
This commit is contained in:
@@ -73,7 +73,7 @@ class AccountListJob
|
||||
$request->withGet($params);
|
||||
|
||||
// 调用公司账号列表获取方法
|
||||
$result = $accountController->getlist($pageIndex,$pageSize,true);
|
||||
$result = $accountController->getlist(['pageIndex' => $pageIndex,'pageSize' => $pageSize],true);
|
||||
$response = json_decode($result,true);
|
||||
|
||||
|
||||
|
||||
@@ -152,7 +152,9 @@ class WorkbenchTrafficDistributeJob
|
||||
'deviceId' => $friend['deviceId'],
|
||||
'wechatFriendId' => $friend['id'],
|
||||
'wechatAccountId' => $account['id'],
|
||||
'createTime' => time()
|
||||
'createTime' => time(),
|
||||
'exp' => $config['exp'],
|
||||
'expTime' => time() + 86400 * $config['exp'],
|
||||
]);
|
||||
Log::info("流量分发工作台 {$workbench->id} 好友[{$friend['id']}]分配给客服[{$account['id']}] 成功");
|
||||
$i++;
|
||||
@@ -206,9 +208,11 @@ class WorkbenchTrafficDistributeJob
|
||||
->join(['s2_wechat_account' => 'wa'], 'wa.id = wf.wechatAccountId', 'left')
|
||||
->join('workbench_traffic_config_item wtci', 'wtci.wechatFriendId = wf.id AND wtci.workbenchId = ' . $config['workbenchId'], 'left')
|
||||
->where([
|
||||
['wf.isDeleted', '=', 0],
|
||||
['wf.isDeleted', '=', 0],
|
||||
['wf.isPassed', '=', 1],
|
||||
//['sa.departmentId', '=', $workbench->companyId],
|
||||
['wtci.expTime', '>', time()],
|
||||
['wtci.id', 'null', null]
|
||||
])
|
||||
->whereIn('wa.currentDeviceId', $devices)
|
||||
|
||||
Reference in New Issue
Block a user