lizhen_gitee před 1 rokem
rodič
revize
6b4931c5b2

+ 2 - 1
application/common/controller/Api.php

@@ -82,8 +82,9 @@ class Api
 
         if(config('site.apisite_switch') == 0){
             $controllername = $this->request->controller();
+            $controllername = strtolower($controllername);
 
-            if(strtolower($controllername) != 'notifynew' && strtolower($controllername) != 'easemob' ){
+            if(!in_array($controllername,['notifynew','easemob','payios'])){
                 $notice = config('site.apisite_notice') ?: '全站维护中';
                 $this->error($notice);
             }

+ 2 - 2
application/index/controller/Plantask.php

@@ -15,7 +15,7 @@ class Plantask extends Controller
 ////////////////////////////////////////下面都是计划任务方法///////////////////////////////////////////////////////////////
     //自动删除3天前的爆币日志,提升统计速度
     public function auto_del_baobi_log(){
-        $today_start = strtotime(date('Y-m-d')) - (86400 * 3);
+        $today_start = strtotime(date('Y-m-d')) - (86400 * 1);
 
         $map = [
             'createtime' => ['lt',$today_start],
@@ -119,7 +119,7 @@ class Plantask extends Controller
         //dump($party_ids);
 
         //更新任务状态
-        $rs_up = Db::name('gift_user_party')->where('party_id','IN',$party_ids)->update(['task_status'=>1]);
+        $rs_up = Db::name('gift_user_party')->where('task_status',0)->where('party_id','IN',$party_ids)->update(['task_status'=>1]);
 
 
         $partyInfo_arr = Db::name('party')->where('id','IN',$party_ids)->column('id,user_id,easemob_room_id');