2 Commits a24bb60adb ... 0519ae7e27

Author SHA1 Message Date
  曹鹤洋 0519ae7e27 Merge branch 'master' of https://git.7in6.com/wuwenqiang/dm-v3.7in6.com 1 year ago
  曹鹤洋 23be376b6c mongodb管理员权限问题优化 1 year ago

+ 3 - 3
application/admin/controller/QcodeBach.php

@@ -664,7 +664,7 @@ class QcodeBach extends Backend
                 'main_unit'         =>$req['row']['main_unit'],
                 'sec_unit'          =>$req['row']['sec_unit'],
                 'proportion'        =>$req['row']['proportion'],
-                'create_time'        =>date('Y-m-d H:i:s'),
+                'create_time'       =>time(),
             ];
             //插入数据
             $re = $this->model->save($data);
@@ -755,7 +755,7 @@ class QcodeBach extends Backend
         $qcodeSmall = new QcodeSmall();
 
         $data = [
-            'delete_time'=>date('Y-m-d H:i:s')
+            'delete_time'=>time(),
         ];
         $bool1 = $this->model->name($company_id.'_'."qcode_bach")->where('_id',$ids)->update($data);
         $bool2 = $qcodeLarge->name($company_id.'_'."qcode_large")->where('bach_id',$ids)->update($data);
@@ -784,7 +784,7 @@ class QcodeBach extends Backend
 
         $data = [
             'product_id'=>$ids,
-            'create_time'=>date('Y-m-d H:i:s'),
+            'create_time'=>time(),
         ];
 
         //插入qcode_company数据

+ 0 - 1
application/api/controller/Index.php

@@ -216,7 +216,6 @@ class Index extends Api
         $rows1 = $qcodeClassification->select();
 
         foreach($rows1 as $v){
-            dump($v['product_code']);
             //2. 获取设置主表数据
             $row = [];
             $row['code'] = substr($v['product_code'],0,4);

+ 1 - 1
vendor/topthink/think-mongo/src/Connection.php

@@ -151,7 +151,7 @@ class Connection
             if ($config['pk_convert_id'] && '_id' == $config['pk']) {
                 $this->config['pk'] = 'id';
             }
-            $host = 'mongodb://' . ($config['username'] ? "{$config['username']}" : '') . ($config['password'] ? ":{$config['password']}@" : '') . $config['hostname'] . ($config['hostport'] ? ":{$config['hostport']}" : '') . '/' . ($config['database'] ? "{$config['database']}" : '');
+            $host = 'mongodb://' . ($config['username'] ? "{$config['username']}" : '') . ($config['password'] ? ":{$config['password']}@" : '') . $config['hostname'] . ($config['hostport'] ? ":{$config['hostport']}" : '');
             if ($config['debug']) {
                 $startTime = microtime(true);
             }