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