代码优化

This commit is contained in:
wong
2025-07-07 14:54:01 +08:00
parent 2f0fd2e10f
commit 9349fdcbea
3 changed files with 21 additions and 3 deletions

View File

@@ -177,14 +177,13 @@ class Adapter implements WeChatServiceInterface
if ($taskData) {
foreach ($taskData as $task) {
$task_id = $task['task_id'];
$task_info = $this->getCustomerAcquisitionTask($task_id);
if (empty($task_info['status']) || empty($task_info['reqConf']) || empty($task_info['reqConf']['device'])) {
continue;
}
//筛选出设备在线微信在线
$wechatIdAccountIdMap = $this->getWeChatIdsAccountIdsMapByDeviceIds($task_info['reqConf']['device']);
if (empty($wechatIdAccountIdMap)) {
@@ -690,6 +689,7 @@ class Adapter implements WeChatServiceInterface
}
$records = Db::table('s2_wechat_account')
->where('deviceAlive', 1)
->where('wechatAlive', 1)
->where('currentDeviceId', 'in', $deviceIds)
->field('id,wechatId')
->column('id,wechatId');