提交 4e3dd249 authored 作者: chengye's avatar chengye

修改供应商接口满足一次取出所有供应商数据

上级 01a77242
...@@ -19,10 +19,10 @@ class opensupplierClassAction extends openapiAction ...@@ -19,10 +19,10 @@ class opensupplierClassAction extends openapiAction
$page_size = $post['page_size']? $post['page_size']:10; $page_size = $post['page_size']? $post['page_size']:10;
$sort =$post['sort']? $post['sort']: 'desc'; $sort =$post['sort']? $post['sort']: 'desc';
$where = ' where '; $where = '';
if(!empty($post['email'])){ if(!empty($post['email'])){
$user = $this->db->getone('oa_userinfo', 'email = \''.$post['email'].'\''); $user = $this->db->getone('oa_userinfo', 'email = \''.$post['email'].'\'');
$where .= ' deptname = '.$user['deptname']; $where = ' where deptname = '.$user['deptname'];
} }
if($post['count'] == 'all') if($post['count'] == 'all')
$sql = 'select id,number,name from [Q]supplier as c '.$where.' order by c.id '.$sort; $sql = 'select id,number,name from [Q]supplier as c '.$where.' order by c.id '.$sort;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论