This commit is contained in:
2025-03-25 19:43:26 +08:00
parent 517709254a
commit 3e7295fec4
12 changed files with 191 additions and 59 deletions

View File

@@ -21,18 +21,21 @@ class GechatroomLogic extends BaseLogic
*
*
*/
function getChatroomList()
function getChatroomList($ai_config_id)
{
//$this->getChatroomMemberList();die;
//$base_url = config('gewechat.base_url');
//去查询群名称
$wxids_arr = (new GewechatFriendsLogic())->getFriendWxIdsList();
$logic = new GewechatFriendsLogic();
$logic->setBaseUrl($ai_config_id);
$wxids_arr = $logic->getFriendWxIdsList();
$chatrooms = $wxids_arr['data']['chatrooms'];
$url = '/group/getChatroomInfo';
Tools::log_to_write_txt(['获取群列表[带群名称],包含了群成员列表,入参:$chatrooms'=>$chatrooms]);
$arr = [];
foreach ($chatrooms as $v){
$post_data = ['chatroomId'=>$v];
$res = self::curl_post_json($url, $post_data);
$res = $logic->curl_post_json($url, $post_data);
//群号=>群信息[含群成员列表]
$arr[] = array_merge($res['data'],[
'id'=>$v,
@@ -54,7 +57,7 @@ class GechatroomLogic extends BaseLogic
$arr = [];
foreach ($chatrooms as $v){
$post_data = ['chatroomId'=>$v];
$res = self::curl_post_json($url, $post_data);
$res = $this->curl_post_json($url, $post_data);
dump($res);die;
//群号=>群信息[含群成员列表]
$arr[$v] = array_merge($res['data'],[
@@ -80,7 +83,7 @@ class GechatroomLogic extends BaseLogic
$arr = [];
foreach ($chatrooms as $v){
$post_data = ['chatroomId'=>$v];
$res = self::curl_post_json($url, $post_data);
$res = $this->curl_post_json($url, $post_data);
dump($res);die;
//群号=>群信息[含群成员列表]
$arr[$v] = array_merge($res['data'],[