优化代码

main
gzydong 2021-03-31 22:30:10 +08:00
parent 4d9f71ac61
commit 3d22010bec
1 changed files with 2 additions and 1 deletions

View File

@ -63,6 +63,7 @@ class GroupService extends BaseService
*/ */
public function create(int $user_id, array $group_info, $friend_ids = []) public function create(int $user_id, array $group_info, $friend_ids = [])
{ {
$invite_ids = implode(',', $friend_ids);
$friend_ids[] = $user_id; $friend_ids[] = $user_id;
$groupMember = []; $groupMember = [];
$chatList = []; $chatList = [];
@ -123,7 +124,7 @@ class GroupService extends BaseService
'record_id' => $result->id, 'record_id' => $result->id,
'type' => 1, 'type' => 1,
'operate_user_id' => $user_id, 'operate_user_id' => $user_id,
'user_ids' => implode(',', $friend_ids) 'user_ids' => $invite_ids
]); ]);
Db::commit(); Db::commit();