...
|
...
|
@@ -155,6 +155,29 @@ class Index extends Frontend |
|
|
// var_dump($content);
|
|
|
}
|
|
|
|
|
|
// 修改已到期订单未过期,并禁言用户
|
|
|
public function over_order() {
|
|
|
$end_time = time();
|
|
|
$start_time = time()-60;
|
|
|
$where = [
|
|
|
'status' => 2,
|
|
|
'expirationtime' => ['between',[$start_time,$end_time]],
|
|
|
'finish_status' => 1,
|
|
|
'is_chargeback' => 2
|
|
|
];
|
|
|
$order_list = Db::name('order')->where($where)->select(); // 查询符合要求的到期订单
|
|
|
foreach ($order_list as $order) {
|
|
|
$update = [
|
|
|
'id' => $order['id'],
|
|
|
'finish_status' => 2
|
|
|
];
|
|
|
Db::name('order')->update($update);
|
|
|
// 群组禁言
|
|
|
$return = rongyun_ban($order);
|
|
|
Log::write(date('Y-m-d H:i') . '添加指定群组全部禁言成功,返回结果:' . $order['chat_id'] . json_encode($return, JSON_UNESCAPED_UNICODE), 'rongyun_log');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 融云服务端实时消息回调
|
|
|
public function callback() {
|
|
|
$param = $this->request->param();
|
...
|
...
|
|