作者 liyuhang

Merge branch 'dev' of http://47.244.231.31:8099/zhl/globalso-v6 into dev

@@ -18,7 +18,7 @@ class Base extends Model @@ -18,7 +18,7 @@ class Base extends Model
18 public function lists($map, $p, $row, $order = 'id', $fields = ['*']){ 18 public function lists($map, $p, $row, $order = 'id', $fields = ['*']){
19 //TODO::where(['id'=>'','name'=>'']) 19 //TODO::where(['id'=>'','name'=>''])
20 $lists = $this->select($fields)->where($map)->forPage($p,$row)->orderBy($order)->get(); 20 $lists = $this->select($fields)->where($map)->forPage($p,$row)->orderBy($order)->get();
21 - if ($lists->isEmpty() !== false) { 21 + if (empty($lists)) {
22 return false; 22 return false;
23 } 23 }
24 $lists = $lists->toArray(); 24 $lists = $lists->toArray();
@@ -38,7 +38,7 @@ class Base extends Model @@ -38,7 +38,7 @@ class Base extends Model
38 */ 38 */
39 public function list($map,$order = 'id',$fields = ['*']){ 39 public function list($map,$order = 'id',$fields = ['*']){
40 $lists = $this->select($fields)->where($map)->orderBy($order)->get(); 40 $lists = $this->select($fields)->where($map)->orderBy($order)->get();
41 - if ($lists->isEmpty() !== false) { 41 + if (empty($lists)) {
42 return false; 42 return false;
43 } 43 }
44 $lists = $lists->toArray(); 44 $lists = $lists->toArray();
@@ -54,7 +54,7 @@ class Base extends Model @@ -54,7 +54,7 @@ class Base extends Model
54 public function read($condition,$files = ['*']) 54 public function read($condition,$files = ['*'])
55 { 55 {
56 $info = $this->select($files)->where($condition)->first(); 56 $info = $this->select($files)->where($condition)->first();
57 - if ($info->isEmpty() !== false) { 57 + if (empty($info)) {
58 return false; 58 return false;
59 } 59 }
60 $info = $info->toArray(); 60 $info = $info->toArray();
@@ -8,4 +8,5 @@ class Manager extends Base @@ -8,4 +8,5 @@ class Manager extends Base
8 protected $table = 'manager'; 8 protected $table = 'manager';
9 //自动维护create_at创建时间 updated_at修改时间 9 //自动维护create_at创建时间 updated_at修改时间
10 public $timestamps = true; 10 public $timestamps = true;
  11 +
11 } 12 }
@@ -8,4 +8,5 @@ class Product extends Base @@ -8,4 +8,5 @@ class Product extends Base
8 protected $table = 'gl_product'; 8 protected $table = 'gl_product';
9 //自动维护create_at创建时间 updated_at修改时间 9 //自动维护create_at创建时间 updated_at修改时间
10 public $timestamps = true; 10 public $timestamps = true;
  11 +
11 } 12 }
@@ -10,6 +10,7 @@ class Project extends Base @@ -10,6 +10,7 @@ class Project extends Base
10 protected $table = 'gl_project'; 10 protected $table = 'gl_project';
11 //自动维护create_at创建时间 updated_at修改时间 11 //自动维护create_at创建时间 updated_at修改时间
12 public $timestamps = true; 12 public $timestamps = true;
  13 + protected $dateFormat = 'Y-m-d';
13 14
14 /** 15 /**
15 * @name:获取当前对象不分页列表 16 * @name:获取当前对象不分页列表