• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP dbeav_model类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中dbeav_model的典型用法代码示例。如果您正苦于以下问题:PHP dbeav_model类的具体用法?PHP dbeav_model怎么用?PHP dbeav_model使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了dbeav_model类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: save

 function save(&$sdf, $mustUpdate = null)
 {
     if (!isset($sdf['orders'])) {
         $sdf['orders'] = array(array('order_id' => $sdf['order_id'], 'items' => $sdf['items']));
     }
     $tmpvar = $sdf['orders'];
     foreach ($tmpvar as $k => $row) {
         $sdf['orders'][$k]['dlytype'] = 'reship';
         $sdf['orders'][$k]['dly_id'] = $sdf['reship_id'];
     }
     unset($tmpvar);
     if (parent::save($sdf)) {
         //一张发货单多个订单
         $oOrder =& $this->app->model('orders');
         foreach ($sdf['orders'] as $order) {
             if ($sdf['order_id']) {
                 $sdf_order = $oOrder->dump($order['order_id']);
                 if ($sdf_order['ship_status'] == 5) {
                     continue;
                 }
                 //todo 订单是否完全发货
                 $data['ship_status'] = 4;
                 $data['order_id'] = $sdf['order_id'];
                 $filter['order_id'] = $sdf['order_id'];
                 $orders =& $this->app->model('orders');
                 $orders->update($data, $filter);
             }
         }
     }
     return true;
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:31,代码来源:reship.php


示例2:

 function __construct($app)
 {
     parent::__construct($app);
     $db = app::get('system')->database();
     $db->exec('set SESSION autocommit=1;');
     $db->exec('set @msgID = -1;');
 }
开发者ID:453111208,项目名称:bbc,代码行数:7,代码来源:mysql.php


示例3: _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


示例4: save

 public function save(&$data, $mustUpdate = null, $mustInsert = false)
 {
     if ($data['area_fee_conf'] && is_array($data['area_fee_conf'])) {
     }
     $return = parent::save($data, $mustUpdate);
     return $return;
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:7,代码来源:dlytype.php


示例5: save

 function save(&$data, $mustUpdate = null, $mustInsert = false)
 {
     if ($data['custom'] == 'false') {
         return true;
     }
     parent::save($data, $mustUpdate);
 }
开发者ID:sss201413,项目名称:ecstore,代码行数:7,代码来源:price.php


示例6: save

 function save(&$data, $mustUpdate = null)
 {
     if ($data['area']) {
         $data['area'] = $data['area']['area_type'] . ':' . implode('/', $data['area']['sar']) . ':' . $data['area']['id'];
     }
     return parent::save($data, $mustUpdate);
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:7,代码来源:addrs.php


示例7: getList

 /**
  * 重写getList方法
  * @param string column
  * @param array filter
  * @param int offset
  * @param int limit
  * @param string order by
  */
 public function getList($cols = '*', $filter = array(), $offset = 0, $limit = -1, $orderType = null)
 {
     $recycle_permission = $filter['recycle_permission'];
     unset($filter['recycle_permission']);
     if ($recycle_permission && is_array($recycle_permission)) {
         if (strpos($cols, 'permission') === false) {
             $cols .= ',permission ';
         }
     }
     $ids = array();
     $res = app::get('base')->model('apps')->getList('app_id', array('status' => 'active'));
     foreach ($res as $res_v) {
         $ids[] = $res_v['app_id'];
     }
     $filter['app_key|in'] = $ids;
     $data = parent::getList($cols, $filter, $offset, $limit, $orderType);
     if ($recycle_permission && is_array($recycle_permission)) {
         $aTmp = array();
         $menus = $this->app->model('menus');
         $recycle = $this->app->model('recycle');
         foreach ($data as $k => $v) {
             $per_row = $menus->getList('menu_id', array('menu_type' => 'permission', 'permission' => $v['permission']));
             if (!$per_row || in_array($v['permission'], $recycle_permission)) {
                 $aTmp[$k] = $v;
             }
         }
         return $aTmp;
     } else {
         return $data;
     }
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:39,代码来源:recycle.php


示例8: save

 /**
  * 保存的方法
  * @param mixed 保存的数据内容
  * @return boolean
  */
 public function save(&$aData, $mustUpdate = null, $mustInsert = false)
 {
     $path = array();
     $parent_id = $aData['parent_id'];
     while ($parent_id) {
         if ($aData['cat_id'] && $aData['cat_id'] == $parent_id) {
             return false;
             break;
         }
         array_unshift($path, $parent_id);
         $row = $this->dump(array('cat_id' => $parent_id), 'parent_id, cat_path, p_order');
         $parent_id = $row['parent_id'];
     }
     $olddata = $this->getList('*', array('cat_id' => $aData['cat_id']));
     if ($olddata[0]['parent_id'] && $olddata[0]['parent_id'] != $aData['parent_id']) {
         $row = $this->getList('*', array('cat_id' => $olddata[0]['parent_id']));
         $oldSave['cat_id'] = $row[0]['cat_id'];
         $oldSave['child_count'] = $row[0]['child_count'] - 1;
         parent::save($oldSave);
     }
     $aData['cat_path'] = $this->getCatPath($aData['parent_id']);
     if ($aData['parent_id'] != 0) {
         $row = parent::dump($aData['parent_id']);
         $data['child_count'] = $row['child_count'] + 1;
         $data['cat_id'] = $aData['parent_id'];
         parent::save($data);
     }
     parent::save($aData);
     return $this->cat2json();
 }
开发者ID:noikiy,项目名称:snk.com,代码行数:35,代码来源:cat.php


示例9: getDetail

 /**
  * 获得商店详情
  * 
  * @param   array   $param          参数
  * @param   number  $update_visit   是否更新访问,1->更新(默认), 其它 -> 不更新
  * @return  array
  */
 function getDetail($param = array(), $update_visit = 1)
 {
     $info = array();
     $shop_id = $param['shop_id'] ? $param['shop_id'] : 0;
     $member_id = $param['member_id'] ? $param['member_id'] : 0;
     if ($shop_id > 0 || $member_id > 0) {
         if ($shop_id) {
             $filter['shop_id'] = $param['shop_id'];
         }
         if ($member_id) {
             $filter['member_id'] = $param['member_id'];
         }
         $info = parent::dump($filter);
         // 添加商品访问
         if ($info['is_open'] == 1) {
             if ($update_visit == 1) {
                 $_info = array('see_num' => $info['see_num'] + 1);
                 parent::update($_info, array('shop_id' => $info['shop_id']));
             }
             $_param = array('app' => 'microshop', 'ctl' => 'site_index', 'full' => 1, 'act' => 'detail', 'arg0' => $info['shop_id']);
             $info['shop_link'] = app::get('site')->router()->gen_url($_param);
             $m_mdl = app::get('b2c')->model('members');
             $m_info = $m_mdl->dump($info['member_id']);
             $info['follow_num'] = $m_info['follow_num'];
             $info['fans_num'] = $m_info['follow_num'];
             $info['cover'] = $m_info['cover'] ? kernel::single('base_storager')->image_path($m_info['cover']) : $this->app->res_url . '/images/top-bg.png';
             $info['avatar'] = $m_info['avatar'] ? kernel::single('base_storager')->image_path($m_info['avatar']) : $this->app->res_url . '/images/top-bg.png';
             $info['info'] = $m_info['info'];
         }
     }
     return $info;
 }
开发者ID:noikiy,项目名称:Ecstore-to-odoo,代码行数:39,代码来源:shop.php


示例10: _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


示例11: update

 public function update($params, $filter)
 {
     $params = $this->valid_update($params);
     if (!$params) {
         return false;
     }
     return parent::update($params, $filter);
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:8,代码来源:bodys.php


示例12: dump

 function dump($filter, $field = '*', $subSdf = null)
 {
     if ($ret = parent::dump($filter, $field, $subSdf)) {
         $ret['profile']['birthday'] = $ret['b_year'] . '-' . $ret['b_month'] . '-' . $ret['b_day'];
         $ret['profile']['gender'] = $ret['profile']['gender'] == 1 ? 'male' : 'female';
     }
     return $ret;
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:8,代码来源:members.php


示例13: _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


示例14: getList

 public function getList($cols = '*', $filter = 'null', $offset = 0, $limit = -1, $orderby = null)
 {
     $list = parent::getList($cols, $filter, $offset, $limit, $orderby);
     foreach ($list as $key => $row) {
         $list[$key]['content'] = base64_decode($row['content']);
     }
     return $list;
 }
开发者ID:453111208,项目名称:bbc,代码行数:8,代码来源:file.php


示例15: save

 function save(&$item)
 {
     $list = parent::getList('*', array('tag_name' => $item['tag_name'], 'tag_type' => $item['tag_type'], 'app_id' => $item['app_id']));
     if ($list && count($list) > 0) {
         $item['tag_id'] = $list[0]['tag_id'];
     }
     parent::save($item);
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:8,代码来源:tag.php


示例16: getList

 /**
  * getList
  * @params string - 
  * @params array - 
  * @params ƫʼֵ
  * @params ƫλֵ
  * @params 
  */
 public function getList($cols = '*', $filter = array(), $offset = 0, $limit = -1, $orderby = null)
 {
     if ($filter) {
         return parent::getList($cols, $filter, $offset, $limit, $orderby);
     } else {
         return parent::getList($cols, null, $offset, $limit, $orderby);
     }
 }
开发者ID:sss201413,项目名称:ecstore,代码行数:16,代码来源:log.php


示例17: save

 function save($aData)
 {
     $default_lv_id = $this->get_default_lv();
     /*
             if( $aData['member_lv_id'] && $default_lv_id && $aData['member_lv_id'] != $default_lv_id ){
                 $this->unset_default_lv($default_lv_id);
             }*/
     return parent::save($aData);
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:9,代码来源:lv.php


示例18: getList

 function getList($cols = '*', $filter = array(), $offset = 0, $limit = -1, $orderType = null)
 {
     $row = parent::getList($cols, $filter, $offset, $limit, $orderType);
     foreach ($row as $key => $val) {
         $val['type_name'] = $this->get_type_name($val['type_id']);
         $aData[] = $val;
     }
     return $aData;
 }
开发者ID:syjzwjj,项目名称:quyeba,代码行数:9,代码来源:point.php


示例19: getList

 public function getList($cols = '*', $filter = array(), $offset = 0, $limit = -1, $orderType = null)
 {
     $this->monitor_txt();
     $list = parent::getList($cols, $filter, $offset, $limit, $orderType);
     // foreach ($list as $key => &$value) {
     //     $value['flag'] = $this->app->res_url.'/misc/'.strtolower($value['ct_abbreviation']).'.png';
     // }
     return $list;
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:9,代码来源:country.php


示例20: getList

 /**
  * 重写getlist方法,重写排序方式
  */
 public function getList($cols = '*', $filter = array(), $offset = 0, $limit = -1, $orderType = null)
 {
     if ($orderType) {
         $orderType .= ',ordernum ASC';
     } else {
         $orderType = 'ordernum ASC';
     }
     return parent::getList($cols, $filter, $offset, $limit, $orderType);
 }
开发者ID:syjzwjj,项目名称:quyeba,代码行数:12,代码来源:dlycorp.php



注:本文中的dbeav_model类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP dbex类代码示例发布时间:2022-05-23
下一篇:
PHP dbconnection类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap