diff --git a/Server/application/cunkebao/controller/ContentLibraryController.php b/Server/application/cunkebao/controller/ContentLibraryController.php index 9b048c3f4..21389fc45 100644 --- a/Server/application/cunkebao/controller/ContentLibraryController.php +++ b/Server/application/cunkebao/controller/ContentLibraryController.php @@ -863,6 +863,7 @@ class ContentLibraryController extends Controller 'message' => '没有指定要采集的好友' ]; } + $friendData = []; try { $toAccountId = ''; $username = Env::get('api.username', ''); @@ -890,6 +891,7 @@ class ContentLibraryController extends Controller $totalMomentsCount = 0; foreach ($friends as $friend) { + $friendData = $friend; if (!empty($username) && !empty($password)) { //执行切换好友命令 $automaticAssign = new AutomaticAssign(); @@ -1013,6 +1015,12 @@ class ContentLibraryController extends Controller ]; } catch (\Exception $e) { + + $cacheFriend = $friendData; + $cacheFriend['friendId'] = $friend['id']; + artificialAllotWechatFriend($friend); + + return [ 'status' => 'error', 'message' => '采集过程发生错误: ' . $e->getMessage()