代码同步
This commit is contained in:
@@ -227,10 +227,10 @@ class AiSettingsController extends BaseController
|
|||||||
if (!empty($friendIds)) {
|
if (!empty($friendIds)) {
|
||||||
//强制更新
|
//强制更新
|
||||||
if(!empty($isUpdata)){
|
if(!empty($isUpdata)){
|
||||||
Db::name('ai_friend_settings')->whereIn('friendId',$friendIds)->update(['type' => $type,'updateTime' => time()]);
|
FriendSettings::whereIn('friendId',$friendIds)->update(['type' => $type,'updateTime' => time()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$existing = FriendSettings::where('companyId', $companyId)->where('friendId', 'in', $friendIds)->field('friendId')->select();
|
$existing = FriendSettings::where('companyId', $companyId)->where('friendId', 'in', $friendIds)->field('friendId')->select()->toArray();
|
||||||
$existingPhones = array_column($existing, 'friendId');
|
$existingPhones = array_column($existing, 'friendId');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ class AiSettingsController extends BaseController
|
|||||||
}
|
}
|
||||||
// 4. 批量插入新数据
|
// 4. 批量插入新数据
|
||||||
if (!empty($newData)) {
|
if (!empty($newData)) {
|
||||||
Db::name('ai_friend_settings')->insertAll($newData);
|
FriendSettings::insertAll($newData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user