12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace app\index\controller;
- use think\Controller;
- use think\Db;
- use think\Cache;
- class Plantask extends Controller
- {
- //未支付订单N分钟后自动取消
- public function auto_cancel_nopay_order(){
- }
- //自动取消未接诊订单
- public function auto_cancel_noaccept_order(){
- }
- //视频订单接诊后,并第一次拨打N分钟自动结束
- public function auto_finish_accept_videoorder(){
- }
- /////////////////////////////////////////////////////////////////////////
- //定时跑用户活跃,改成离线
- public function auto_user_active(){
- $actitime = time() - 7200;
- $sql = 'update `mt_user` set is_active = 0 where is_active = 1 and id in (select user_id from mt_user_active where requesttime < '.$actitime.')';
- db()->query($sql);
- }
- //vip过期的,三个隐私设置改成0
- //vip过期的,更新用户表is_vip
- public function auto_vipend(){
- // $sql = 'update `mt_user_power` set yinsi = 0,yinshen = 0,wuhen = 0 where user_id in (select user_id from mt_user_wallet where vip_endtime > 0 and vip_endtime < '.time().')';
- // db()->query($sql);
- /*$sql2 = 'update `mt_user` set is_vip = 0 where is_vip = 1 and user_id in (select user_id from mt_user_wallet where vip_endtime > 0 and vip_endtime < '.time().')';
- db()->query($sql2);*/
- }
- }
|