本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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 ');
}