|
@@ -21,11 +21,11 @@ class Express extends \app\BaseController
|
|
|
$where = [["type","=",$type]];
|
|
|
$name = isset($this->post['name']) &&$this->post['name'] !="" ? trim($this->post['name']):'';
|
|
|
if($name!=''){
|
|
|
- $where[]=["name|shortName","=","%{$name}%"];
|
|
|
+ $where[]=["name|shortName","like","%{$name}%"];
|
|
|
}
|
|
|
$count = Db::name("express")->where($where)->count();
|
|
|
$page>=ceil($count/$size) ? $page=ceil($count/$size) :"";
|
|
|
- $list= Db::name("express")->where($where)->field('type,comTypeName,name,shortName,shortNameEn,shortNumber,canOrder')
|
|
|
+ $list= Db::name("express")->where($where)->field('id,type,comTypeName,name,shortName,shortNameEn,shortNumber,canOrder')
|
|
|
->page($page,$size)->select();
|
|
|
return app_show(0,'获取成功',['list'=>$list,"count"=>$count]);
|
|
|
}
|
|
@@ -49,9 +49,9 @@ class Express extends \app\BaseController
|
|
|
$where = [["type","=",$type],['canOrder',"=",1]];
|
|
|
$name = isset($this->post['name']) &&$this->post['name'] !="" ? trim($this->post['name']):'';
|
|
|
if($name!=''){
|
|
|
- $where[]=["name|shortName","=","%{$name}%"];
|
|
|
+ $where[]=["name|shortName","like","%{$name}%"];
|
|
|
}
|
|
|
- $list= Db::name("express")->where($where)->field('type,comTypeName,name,shortName,shortNameEn,shortNumber,canOrder')
|
|
|
+ $list= Db::name("express")->where($where)->field('id,type,comTypeName,name,shortName,shortNameEn,shortNumber,canOrder')
|
|
|
->select();
|
|
|
return app_show(0,'获取成功',$list);
|
|
|
}
|