正在显示
1 个修改的文件
包含
23 行增加
和
0 行删除
@@ -155,6 +155,29 @@ class Index extends Frontend | @@ -155,6 +155,29 @@ class Index extends Frontend | ||
155 | // var_dump($content); | 155 | // var_dump($content); |
156 | } | 156 | } |
157 | 157 | ||
158 | + // 修改已到期订单未过期,并禁言用户 | ||
159 | + public function over_order() { | ||
160 | + $end_time = time(); | ||
161 | + $start_time = time()-60; | ||
162 | + $where = [ | ||
163 | + 'status' => 2, | ||
164 | + 'expirationtime' => ['between',[$start_time,$end_time]], | ||
165 | + 'finish_status' => 1, | ||
166 | + 'is_chargeback' => 2 | ||
167 | + ]; | ||
168 | + $order_list = Db::name('order')->where($where)->select(); // 查询符合要求的到期订单 | ||
169 | + foreach ($order_list as $order) { | ||
170 | + $update = [ | ||
171 | + 'id' => $order['id'], | ||
172 | + 'finish_status' => 2 | ||
173 | + ]; | ||
174 | + Db::name('order')->update($update); | ||
175 | + // 群组禁言 | ||
176 | + $return = rongyun_ban($order); | ||
177 | + Log::write(date('Y-m-d H:i') . '添加指定群组全部禁言成功,返回结果:' . $order['chat_id'] . json_encode($return, JSON_UNESCAPED_UNICODE), 'rongyun_log'); | ||
178 | + } | ||
179 | + } | ||
180 | + | ||
158 | // 融云服务端实时消息回调 | 181 | // 融云服务端实时消息回调 |
159 | public function callback() { | 182 | public function callback() { |
160 | $param = $this->request->param(); | 183 | $param = $this->request->param(); |
-
请 注册 或 登录 后发表评论