hzd 4 månader sedan
förälder
incheckning
9dceac4b2d
2 ändrade filer med 19 tillägg och 3 borttagningar
  1. 1 1
      .env.example
  2. 18 2
      application/index/controller/Index.php

+ 1 - 1
.env.example

@@ -1 +1 @@
-[APP]
APP_DEBUG = true
APP_HOST = https://mdyg.sdmingde.cn
[DATABASE]
HOSTNAME = 121.36.53.58
DATABASE = wy_jili2_com
USERNAME = wy_jili2_com
PASSWORD = J8FTMapBeXHsEhKd
HOSTPORT = 3306
CHARSET = utf8mb4






+[APP]
APP_DEBUG = true
APP_HOST = https://mdyg.sdmingde.cn
[DATABASE]
HOSTNAME = 121.36.53.58
DATABASE = wy_jili2_com
USERNAME = wy_jili2_com
PASSWORD = J8FTMapBeXHsEhKd
HOSTPORT = 3306
CHARSET = utf8mb4


[APP]
APP_DEBUG = true
APP_HOST = https://mdyg.sdmingde.cn
[DATABASE]
HOSTNAME = 127.0.0.1
DATABASE = jili2
USERNAME = root
PASSWORD = 123456
HOSTPORT = 3306
CHARSET = utf8mb4











+ 18 - 2
application/index/controller/Index.php

@@ -18,7 +18,23 @@ class Index extends Controller
 //        $this->model = new \app\common\model\Daily();
     }
 
-    public function device(){
+    public function device()
+    {
+        set_time_limit(0);
+        ini_set("memory_limit", "512M");
+        $cates = [24,25,26,27];
+        $uids = [3206,3207];
+        exit();
+        $lists = Db::name('device')->where('org_id',100)->where('cate_id','in',$cates)->select();
+        foreach ($lists as $k=>$v){
+            Db::name('device_user')->where('device_id',$v['id'])->delete();
+            Db::name('device_user')->insert(['device_id'=>$v['id'],'user_id'=>3206]);
+            Db::name('device_user')->insert(['device_id'=>$v['id'],'user_id'=>3207]);
+        }
+        halt($lists);
+    }
+
+    public function device2(){
         set_time_limit(0);
         ini_set("memory_limit","512M");
 
@@ -60,7 +76,7 @@ class Index extends Controller
         halt($data);
     }
 
-    public function device2(){
+    public function device3(){
         set_time_limit(0);
         ini_set("memory_limit","2048M");