1234567891011121314151617181920212223242526272829 |
- <?php
- defined('InShopNC') or exit('Access Invalid!');
- class refill_providerModel extends Model
- {
- public function getProviderInfo($cond)
- {
- return $this->table('refill_provider')->where($cond)->find();
- }
- public function addProvider($insert){
- return $this->table('refill_provider')->insert($insert);
- }
- public function editProvider($update, $condition)
- {
- return $this->table('refill_provider')->where($condition)->update($update);
- }
- public function delProvider($condition)
- {
- return $this->table('refill_provider')->where($condition)->delete();
- }
- public function getProviderList($condition, $pagesize = '', $field = '*', $order = 'provider_id desc', $limit = '')
- {
- $list = $this->table('refill_provider')->field($field)->where($condition)->page($pagesize)->order($order)->limit($limit)->select();
- if (empty($list)) return [];
- return $list;
- }
- }
|