作者 Cool

退单接口新增群聊禁言

... ... @@ -10,7 +10,9 @@ namespace app\api\controller;
use app\common\controller\Api;
use RongCloud\RongCloud;
use think\Db;
use think\Log;
use think\Validate;
use wxapp\pay\WeixinPay;
use wxapp\pay\WeixinRefund;
... ... @@ -631,6 +633,17 @@ class Order extends Api
$this->error($result['err_code_des']);
}else{
Db::name('order')->where('id',$param['order_id'])->update(['status'=>3,'finish_status'=>3,'is_chargeback'=>1]);
// 应用配置参数
$config = config('rongyun.config');
$RongSDK = new RongCloud($config['appkey'],$config['appsecret']);
$orders = Db::name('order')->whereBetween('id',$param['order_id'])->find(); // 查询群聊
$Group = $RongSDK->getGroup()->MuteAllMembers();
$params = [
'id'=> $orders['chat_id'],//群组 id
];
$return = $Group->add($params);
Log::write(date('Y-m-d H:i') . '添加指定群组全部禁言成功,返回结果:' . json_encode($return, JSON_UNESCAPED_UNICODE), 'rongyun_log');
$this->success('success');
}
}
... ...