wupengfei 2 years ago
parent
commit
32e3a1069f

+ 5 - 3
application/admin/controller/shopro/order/OrderShift.php

@@ -51,8 +51,9 @@ class OrderShift extends Base
             $sel_where = [];
             if(isset($filter['createtime'])) {
                 $search_time = explode(' - ',$filter['createtime']);
-                $sel_where[]=['create_at','> time',$search_time[0]];
-                $sel_where[]=['create_at','< time',$search_time[1]];
+                var_dump($search_time);
+                $sel_where[]=  ['create_at','between time',$search_time];
+               // $sel_where[] = ['create_at','<time',$search_time[1]];
             }
             if(isset($filter['sh_status']))$sel_where[] = ['sh_status','=',$filter['sh_status']];
             if(isset($filter['user_id']))$sel_where[] = ['user_id','=',$filter['user_id']];
@@ -64,7 +65,8 @@ class OrderShift extends Base
                     $query = $query->table($userTableName)->where($userTableName . '.id=' . $tableName . 'user_id');
                     if (isset($filter['nickname']))$query->where('nickname', 'like', "%{$filter['nickname']}%");
                     if (isset($filter['user_phone']))$query->where('mobile', 'like', "%{$filter['user_phone']}%");
-                })->count();
+                })->buildSql();
+            var_dump($total);
             $list= $this->model->with('user')
                 ->where($sel_where)
                 ->where(function ($query)use ($filter,$tableName,$userTableName){

+ 1 - 1
application/config.php

@@ -18,7 +18,7 @@ return [
     // 应用命名空间
     'app_namespace'          => 'app',
     // 应用调试模式
-    'app_debug'              => Env::get('app.debug', false),
+    'app_debug'              => Env::get('app.debug', true),
     // 应用Trace
     'app_trace'              => Env::get('app.trace', false),
     // 应用模式状态