chenhao 4 年之前
父節點
當前提交
8e056dcbea
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      application/admin/controller/Crontab.php

+ 3 - 1
application/admin/controller/Crontab.php

@@ -112,7 +112,8 @@ class Crontab extends Controller
     public function excelImport()
     {
         set_time_limit(6000);
-        $serialzierData = Db::name('serialize')->where('status',1)->find();
+        $serialzierData = Db::name('serialize')->where('status',1)->where('now_status',0)->find();
+        Db::name('serialize')->where('uni',$serialzierData['uni'])->update(['now_status' => 1]);
         $excel_array =unserialize($serialzierData['text']);
         $uni  = $serialzierData['uni'];
         $uid  = $serialzierData['admin_id'];
@@ -342,5 +343,6 @@ class Crontab extends Controller
             Db::name('import_error')->insertAll($error);
         }
         Db::name('serialize')->where('uni',$serialzierData['uni'])->update(['status' => 2]);
+        Db::name('serialize')->where('uni',$serialzierData['uni'])->update(['now_status' => 2]);
     }
 }