1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace Scm\Lib;
- use Dever;
- class Role
- {
- public function search_api()
- {
- $id = Dever::input('id');
- $keyword = Dever::input('keyword');
- $where = array();
- if ($keyword) {
- $where['name'] = $keyword;
- }
- $id = Dever::input('where_id');
- if ($id) {
- $where['id_no'] = $id;
- }
- $source_type = Dever::input('source_type', 1);
- if ($source_type == 1) {
- return Dever::search('scm_seller/info', $where);
- }
- if ($source_type == 2) {
- return Dever::search('scm_servicer/info', $where);
- }
- if ($source_type == 3) {
- return Dever::search('scm_supplier/info', $where);
- }
- }
- }
|