當前位置: 首頁>>代碼示例>>PHP>>正文


PHP dbeav_model::_filter方法代碼示例

本文整理匯總了PHP中dbeav_model::_filter方法的典型用法代碼示例。如果您正苦於以下問題:PHP dbeav_model::_filter方法的具體用法?PHP dbeav_model::_filter怎麽用?PHP dbeav_model::_filter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在dbeav_model的用法示例。


在下文中一共展示了dbeav_model::_filter方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _filter

 public function _filter($filter, $tableAlias = null, $baseWhere = null)
 {
     if (is_array($filter) && $filter['login_account']) {
         $tmpfilter['login_account'] = $filter['login_account'];
         unset($filter['login_account']);
     }
     if (is_array($filter) && $filter['email']) {
         $tmpfilter['email'] = $filter['email'];
         unset($filter['email']);
     }
     if (is_array($filter) && $filter['mobile']) {
         $tmpfilter['mobile'] = $filter['mobile'];
         unset($filter['mobile']);
     }
     if (is_array($filter) && $tmpfilter) {
         $aData = app::get('sysuser')->model('account')->getList('user_id', $tmpfilter);
         if ($aData) {
             foreach ($aData as $key => $val) {
                 $user[$key] = $val['user_id'];
             }
             $filter['user_id'] = $user;
         } else {
             $filter['user_id'] = '-1';
         }
     }
     $filter = parent::_filter($filter);
     return $filter;
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:28,代碼來源:user.php

示例2: _filter

 public function _filter($filter, $tableAlias = null, $baseWhere = null)
 {
     if (is_array($filter) && $filter['shop_name']) {
         $objMdlShop = app::get('sysshop')->model('shop');
         $adata = $objMdlShop->getList('shop_id', array('shop_name|has' => $filter['shop_name']));
         if ($adata) {
             foreach ($adata as $key => $value) {
                 $shop[$key] = $value['shop_id'];
             }
             $filter['shop_id'] = $shop;
         } else {
             $filter['shop_id'] = "-1";
         }
         unset($filter['shop_name']);
     }
     if (is_array($filter) && $filter['login_account']) {
         $aData = app::get('sysuser')->model('account')->getList('user_id', array('login_account' => $filter['login_account']));
         if ($aData) {
             foreach ($aData as $key => $val) {
                 $user[$key] = $val['user_id'];
             }
             $filter['user_id'] = $user;
         } else {
             $filter['user_id'] = '-1';
         }
         unset($filter['login_account']);
     }
     $filter = parent::_filter($filter, $tableAlias, $baseWhere);
     return $filter;
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:30,代碼來源:trade.php

示例3: _filter

 public function _filter($filter, $tableAlias = null, $baseWhere = null)
 {
     if (is_array($filter) && !$filter['disabled']) {
         $filter['disabled'] = 0;
     }
     $filter = parent::_filter($filter, $tableAlias, $baseWhere);
     return $filter;
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:8,代碼來源:traderate.php

示例4: _filter

 public function _filter($filter, $tbase = '', $baseWhere = null)
 {
     if ($filter['_ignore_filterextend_']) {
         unset($filter['_ignore_filterextend_']);
         return parent::_filter($filter);
     }
     $filter = vmc::singleton('b2c_goods_filter')->goods_filter($filter, $this);
     return parent::_filter($filter);
 }
開發者ID:noikiy,項目名稱:snk,代碼行數:9,代碼來源:goods.php

示例5: _filter

 public function _filter($filter)
 {
     if ($filter['timearea']) {
         $timeArray = explode('-', $filter['timearea']);
         $filter['settlement_time|than'] = strtotime($timeArray[0]);
         $filter['settlement_time|lthan'] = strtotime($timeArray[1]);
         unset($filter['timearea']);
     }
     return parent::_filter($filter);
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:10,代碼來源:detail.php

示例6: _filter

 public function _filter($filter, $tableAlias = null, $baseWhere = null)
 {
     if ($filter['search_bind_name']) {
         $bindData = app::get('weixin')->model('bind')->getRow('id', array('name' => $filter['search_bind_name']));
         $filter['bind_id'] = $bindData['id'];
         unset($filter['search_bind_name']);
     }
     $filter = parent::_filter($filter);
     return $filter;
 }
開發者ID:sss201413,項目名稱:ecstore,代碼行數:10,代碼來源:message.php

示例7: _filter

 public function _filter($filter, $tableAlias = null, $baseWhere = null)
 {
     if (!$filter['branch_bn']) {
         $bn = $this->get_branch_bn();
         if (strlen($bn) > 0) {
             $filter['branch_bn'] = $bn;
         }
     }
     $filter = parent::_filter($filter);
     return $filter;
 }
開發者ID:noikiy,項目名稱:Ecstore-to-odoo,代碼行數:11,代碼來源:touchscreen.php

示例8: _filter

 public function _filter($filter, $tableAlias = null, $baseWhere = null)
 {
     if ($filter['member_key']) {
         $aData = app::get('pam')->model('members')->getList('member_id', array('login_account|has' => $filter['member_key']));
         if ($aData) {
             foreach ($aData as $key => $val) {
                 $member[$key] = $val['member_id'];
             }
             $filter['member_id'] = $member;
         } else {
             return 0;
         }
         unset($filter['member_key']);
     }
     $filter = parent::_filter($filter);
     return $filter;
 }
開發者ID:sss201413,項目名稱:ecstore,代碼行數:17,代碼來源:user.php

示例9: _filter

 public function _filter($filter, $tableAlias = null, $baseWhere = null)
 {
     if ($filter['top_extra_view']) {
         $esi = $this->extra_search_info();
         if (!$filter[$esi['key']['column']]) {
             $filter[$esi['time_column'] . '|bthan'] = kernel::single('archive_finder_archive')->time_from($filter['time_from']);
             $filter[$esi['time_column'] . '|lthan'] = kernel::single('archive_finder_archive')->time_to($filter['time_to']);
         } else {
             if ($mintimemax = $this->document2time($filter[$esi['key']['column']])) {
                 $filter[$esi['time_column'] . '|bthan'] = $mintimemax['start'];
                 $filter[$esi['time_column'] . '|lthan'] = $mintimemax['end'];
             }
         }
         unset($filter['time_from']);
         unset($filter['time_to']);
         unset($filter['top_extra_view']);
     }
     $filter = parent::_filter($filter);
     return $filter;
 }
開發者ID:sss201413,項目名稱:ecstore,代碼行數:20,代碼來源:model.php

示例10: _filter

 public function _filter($filter, $tableAlias = null, $baseWhere = null)
 {
     if ($filter['login_account']) {
         $tmpfilter['login_account'] = $filter['login_account'];
         unset($filter['login_account']);
     }
     if ($tmpfilter) {
         $aData = app::get('sysshop')->model('account')->getList('seller_id', $tmpfilter);
         if ($aData) {
             foreach ($aData as $key => $val) {
                 $seller[$key] = $val['seller_id'];
             }
             $filter['seller_id'] = $seller;
         } else {
             $filter['seller_id'] = '-1';
         }
     }
     $filter = parent::_filter($filter);
     return $filter;
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:20,代碼來源:seller.php

示例11: array

 function _filter($filter)
 {
     $addons = array();
     if (isset($filter['installed'])) {
         $addons[] = $filter['installed'] ? 'status!="uninstalled"' : 'status="uninstalled"';
         unset($filter['installed']);
     }
     if (isset($filter['normalview'])) {
         //普通用戶瀏覽模式
         $hidden_apps = true;
         $hidden_app_ids = $this->get_hidden_app_ids();
         if (count($hidden_app_ids)) {
             $addons[] = "`app_id` NOT IN ('" . join("', '", $hidden_app_ids) . "')";
         }
         //todo: 隱藏信賴app信息
         unset($filter['normalview']);
     }
     $addons = implode(' AND ', $addons);
     if ($addons) {
         $addons .= ' AND ';
     }
     return $addons . parent::_filter($filter);
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:23,代碼來源:apps.php

示例12: array

 function _filter($filter, $tableAlias = null, $baseWhere = null)
 {
     if (isset($filter) && $filter && is_array($filter) && array_key_exists('member_login_name', $filter)) {
         $obj_pam_account = app::get('pam')->model('members');
         $pam_filter = array('login_account|has' => $filter['member_login_name']);
         $row_pam = $obj_pam_account->getList('*', $pam_filter);
         $arr_member_id = array();
         if ($row_pam) {
             foreach ($row_pam as $str_pam) {
                 $arr_member_id[] = $str_pam['member_id'];
             }
             $filter['member_id|in'] = $arr_member_id;
         } else {
             if ($filter['member_login_name'] == '非會員顧客') {
                 $filter['member_id'] = 0;
             }
         }
         unset($filter['member_login_name']);
     }
     foreach (vmc::servicelist('b2c_mdl_orders.filter') as $k => $obj_filter) {
         if (method_exists($obj_filter, 'extend_filter')) {
             $obj_filter->extend_filter($filter);
         }
     }
     $info_object = vmc::service('sensitive_information');
     if (is_object($info_object)) {
         $info_object->opinfo($filter, 'b2c_mdl_orders', __FUNCTION__);
     }
     $filter = parent::_filter($filter);
     return $filter;
 }
開發者ID:noikiy,項目名稱:msk.com,代碼行數:31,代碼來源:orders.php

示例13: _filter

 public function _filter($filter, $tableAlias = null, $baseWhere = null)
 {
     if (!$filter) {
         return parent::_filter($filter);
     }
     if (array_key_exists('rel_id', $filter)) {
         $obj_order_bills = $this->app->model('order_bills');
         $bill_filter = array('rel_id|has' => $filter['rel_id'], 'bill_type' => 'refunds');
         $row_order_bills = $obj_order_bills->getList('bill_id', $bill_filter);
         $arr_member_id = array();
         if ($row_order_bills) {
             $arr_order_bills = array();
             foreach ($row_order_bills as $arr) {
                 $arr_order_bills[] = $arr['bill_id'];
             }
             $filter['refund_id|in'] = $arr_order_bills;
         } else {
             $filter['refund_id'] = 'a';
         }
         unset($filter['rel_id']);
     }
     $filter = parent::_filter($filter);
     return $filter;
 }
開發者ID:sss201413,項目名稱:ecstore,代碼行數:24,代碼來源:refunds.php

示例14: foreach

 function _filter($filter, $tableAlias = null, $baseWhere = null)
 {
     foreach (kernel::servicelist('b2c_mdl_members.filter') as $k => $obj_filter) {
         if (method_exists($obj_filter, 'extend_filter')) {
             $obj_filter->extend_filter($filter);
         }
     }
     if ($filter['member_key']) {
         $aData = app::get('pam')->model('account')->getList('account_id', array('login_name|has' => $filter['member_key']));
         if ($aData) {
             foreach ($aData as $key => $val) {
                 $member[$key] = $val['account_id'];
             }
             $filter['member_id'] = $member;
         } else {
             return 0;
         }
         unset($filter['member_key']);
     }
     $info_object = kernel::service('sensitive_information');
     if (is_object($info_object)) {
         $info_object->opinfo($filter, 'b2c_mdl_members', __FUNCTION__);
     }
     $filter = parent::_filter($filter);
     return $filter;
 }
開發者ID:syjzwjj,項目名稱:quyeba,代碼行數:26,代碼來源:members.php

示例15: array

 function _filter($filter)
 {
     $where = array(1);
     if ($filter['cpns_name']) {
         $where[] = 'cpns_name like\'%' . $filter['cpns_name'] . '%\'';
     }
     if (is_array($filter['cpns_id'])) {
         foreach ($filter['cpns_id'] as $cpns_id) {
             if ($cpns_id != '_ANY_') {
                 $coupons[] = 'sdb_b2c_coupons.cpns_id=' . intval($cpns_id);
             }
         }
         if (count($coupons) > 0) {
             $where[] = '(' . implode($coupons, ' or ') . ')';
         }
         unset($filter['cpns_id']);
     }
     if (!empty($filter['cpns_type']) && is_string($filter['cpns_type'])) {
         $filter['cpns_type'] = explode(',', $filter['cpns_type']);
     }
     if (is_array($filter['cpns_type'])) {
         foreach ($filter['cpns_type'] as $type) {
             if ($type != '_ANY_') {
                 $cpns_type[] = 'sdb_b2c_coupons.cpns_type=\'' . intval($type) . '\'';
             }
         }
         if (count($cpns_type) > 0) {
             $where[] = '(' . implode($cpns_type, ' or ') . ')';
         }
         unset($filter['cpns_type']);
     }
     if (isset($filter['ifvalid'])) {
         if ($filter['ifvalid'] == 1) {
             $curTime = time();
             $where[] = 'cpns_status=\'1\' and pmt_time_begin <= ' . $curTime . ' and pmt_time_end >' . $curTime;
         }
     }
     return parent::_filter($filter) . ' and ' . implode($where, ' and ');
 }
開發者ID:dalinhuang,項目名稱:shopexts,代碼行數:39,代碼來源:coupons.php


注:本文中的dbeav_model::_filter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。