正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
@@ -126,7 +126,7 @@ class Pay extends Api | @@ -126,7 +126,7 @@ class Pay extends Api | ||
126 | Db::name('teacher')->where('id',$order['teacher_id'])->setInc('help_num'); | 126 | Db::name('teacher')->where('id',$order['teacher_id'])->setInc('help_num'); |
127 | // 创建融云用户、群组 | 127 | // 创建融云用户、群组 |
128 | $teacher_id = Db::name('teacher')->where('id',$order['teacher_id'])->value('user_id'); | 128 | $teacher_id = Db::name('teacher')->where('id',$order['teacher_id'])->value('user_id'); |
129 | - $rongyun_chat = $this->rongyun_handle($order['user_id'].','.$teacher_id); | 129 | + $rongyun_chat = $this->rongyun_handle($order['user_id'].','.$teacher_id,$order['id']); |
130 | if($rongyun_chat) { | 130 | if($rongyun_chat) { |
131 | $update['chat_id'] = $rongyun_chat['chat_id']; | 131 | $update['chat_id'] = $rongyun_chat['chat_id']; |
132 | $update['chat_name'] = $rongyun_chat['chat_name']; | 132 | $update['chat_name'] = $rongyun_chat['chat_name']; |
@@ -194,7 +194,7 @@ class Pay extends Api | @@ -194,7 +194,7 @@ class Pay extends Api | ||
194 | 194 | ||
195 | 195 | ||
196 | // 融云创建用户、群组 | 196 | // 融云创建用户、群组 |
197 | - public function rongyun_handle($user_ids) { | 197 | + public function rongyun_handle($user_ids,$order_id) { |
198 | $config = config('rongyun.config'); // 应用配置参数 | 198 | $config = config('rongyun.config'); // 应用配置参数 |
199 | $RongSDK = new RongCloud($config['appkey'],$config['appsecret']); | 199 | $RongSDK = new RongCloud($config['appkey'],$config['appsecret']); |
200 | $users = Db::name('user')->whereIn('id',$user_ids)->column('id,nickname,avatar,rongyun_id,is_create'); // 获取用户信息 | 200 | $users = Db::name('user')->whereIn('id',$user_ids)->column('id,nickname,avatar,rongyun_id,is_create'); // 获取用户信息 |
@@ -221,8 +221,8 @@ class Pay extends Api | @@ -221,8 +221,8 @@ class Pay extends Api | ||
221 | } | 221 | } |
222 | } | 222 | } |
223 | // 创建群组 | 223 | // 创建群组 |
224 | - $chat_id = ''; | ||
225 | - $chat_name = ''; | 224 | + $chat_id = 'xiaowei_teacher'.$order_id; |
225 | + $chat_name = '小微问问房间'.$order_id; | ||
226 | $Group = $RongSDK->getGroup(); | 226 | $Group = $RongSDK->getGroup(); |
227 | $group_params = [ | 227 | $group_params = [ |
228 | 'id'=> $chat_id,//群组 id | 228 | 'id'=> $chat_id,//群组 id |
-
请 注册 或 登录 后发表评论