...
|
...
|
@@ -68,6 +68,13 @@ class Pay extends Api |
|
|
$update['expirationtime'] = $update['paytime'] + 86400*7;
|
|
|
$update['finish_status'] = 1;
|
|
|
Db::name('teacher')->where('id',$order['teacher_id'])->setInc('help_num');
|
|
|
// 创建融云用户、群组
|
|
|
$teacher_id = Db::name('teacher')->where('id',$order['teacher_id'])->value('user_id');
|
|
|
$rongyun_chat = $this->rongyun_handle($order['user_id'].','.$teacher_id);
|
|
|
if($rongyun_chat) {
|
|
|
$update['chat_id'] = $rongyun_chat['chat_id'];
|
|
|
$update['chat_name'] = $rongyun_chat['chat_name'];
|
|
|
}
|
|
|
} else { // 用户支付失败
|
|
|
$update['status']=1;
|
|
|
}
|
...
|
...
|
@@ -96,7 +103,8 @@ class Pay extends Api |
|
|
Db::name('coupon')->insertGetId($coupon);
|
|
|
Db::name('teacher')->where('id',$order['teacher_id'])->setInc('help_num');
|
|
|
// 创建融云用户、群组
|
|
|
$rongyun_chat = $this->rongyun_handle($order['user_id'].','.$order['teacher_id']);
|
|
|
$teacher_id = Db::name('teacher')->where('id',$order['teacher_id'])->value('user_id');
|
|
|
$rongyun_chat = $this->rongyun_handle($order['user_id'].','.$teacher_id);
|
|
|
if($rongyun_chat) {
|
|
|
$update['chat_id'] = $rongyun_chat['chat_id'];
|
|
|
$update['chat_name'] = $rongyun_chat['chat_name'];
|
...
|
...
|
@@ -117,7 +125,8 @@ class Pay extends Api |
|
|
$update['finish_status'] = 1;
|
|
|
Db::name('teacher')->where('id',$order['teacher_id'])->setInc('help_num');
|
|
|
// 创建融云用户、群组
|
|
|
$rongyun_chat = $this->rongyun_handle($order['user_id'].','.$order['teacher_id']);
|
|
|
$teacher_id = Db::name('teacher')->where('id',$order['teacher_id'])->value('user_id');
|
|
|
$rongyun_chat = $this->rongyun_handle($order['user_id'].','.$teacher_id);
|
|
|
if($rongyun_chat) {
|
|
|
$update['chat_id'] = $rongyun_chat['chat_id'];
|
|
|
$update['chat_name'] = $rongyun_chat['chat_name'];
|
...
|
...
|
|