|
@@ -619,9 +619,13 @@ class Order extends Api |
|
@@ -619,9 +619,13 @@ class Order extends Api |
619
|
if(empty($order)){
|
619
|
if(empty($order)){
|
620
|
$this->error('查询为空');
|
620
|
$this->error('查询为空');
|
621
|
}
|
621
|
}
|
|
|
622
|
+
|
622
|
if($order['status'] != 2 || $order['finish_status'] != 1){
|
623
|
if($order['status'] != 2 || $order['finish_status'] != 1){
|
623
|
$this->error('非法的订单状态');
|
624
|
$this->error('非法的订单状态');
|
624
|
}
|
625
|
}
|
|
|
626
|
+ if($order['expirationtime'] < time()) {
|
|
|
627
|
+ $this->error('该订单已到期');
|
|
|
628
|
+ }
|
625
|
|
629
|
|
626
|
$pay = new WeixinRefund();
|
630
|
$pay = new WeixinRefund();
|
627
|
$openid = Db::name('third')->where('user_id',$order['user_id'])->find();
|
631
|
$openid = Db::name('third')->where('user_id',$order['user_id'])->find();
|
|
@@ -634,16 +638,10 @@ class Order extends Api |
|
@@ -634,16 +638,10 @@ class Order extends Api |
634
|
}else{
|
638
|
}else{
|
635
|
Db::name('order')->where('id',$param['order_id'])->update(['status'=>3,'finish_status'=>3,'is_chargeback'=>1]);
|
639
|
Db::name('order')->where('id',$param['order_id'])->update(['status'=>3,'finish_status'=>3,'is_chargeback'=>1]);
|
636
|
|
640
|
|
637
|
- // 应用配置参数
|
|
|
638
|
- $config = config('rongyun.config');
|
|
|
639
|
- $RongSDK = new RongCloud($config['appkey'],$config['appsecret']);
|
|
|
640
|
- $orders = Db::name('order')->whereBetween('id',$param['order_id'])->find(); // 查询群聊
|
|
|
641
|
- $Group = $RongSDK->getGroup()->MuteAllMembers();
|
|
|
642
|
- $params = [
|
|
|
643
|
- 'id'=> $orders['chat_id'],//群组 id
|
|
|
644
|
- ];
|
|
|
645
|
- $return = $Group->add($params);
|
|
|
646
|
- Log::write(date('Y-m-d H:i') . '添加指定群组全部禁言成功,返回结果:' . json_encode($return, JSON_UNESCAPED_UNICODE), 'rongyun_log');
|
641
|
+ // 群组禁言
|
|
|
642
|
+ $return = rongyun_ban($order);
|
|
|
643
|
+ Log::write(date('Y-m-d H:i') . '添加指定群组全部禁言成功,返回结果:' . $order['chat_id'] . json_encode($return, JSON_UNESCAPED_UNICODE), 'rongyun_log');
|
|
|
644
|
+
|
647
|
$this->success('success');
|
645
|
$this->success('success');
|
648
|
}
|
646
|
}
|
649
|
}
|
647
|
}
|