refill_provider.model.php 996 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. defined('InShopNC') or exit('Access Invalid!');
  3. class refill_providerModel extends Model
  4. {
  5. public function getProviderInfo($cond)
  6. {
  7. return $this->table('refill_provider')->where($cond)->find();
  8. }
  9. public function addProvider($insert){
  10. return $this->table('refill_provider')->insert($insert);
  11. }
  12. public function editProvider($update, $condition)
  13. {
  14. return $this->table('refill_provider')->where($condition)->update($update);
  15. }
  16. public function delProvider($condition)
  17. {
  18. return $this->table('refill_provider')->where($condition)->delete();
  19. }
  20. public function getProviderList($condition, $pagesize = '', $field = '*', $order = 'opened asc , provider_id desc', $limit = '')
  21. {
  22. $list = $this->table('refill_provider')->field($field)->where($condition)->page($pagesize)->order($order)->limit($limit)->select();
  23. if (empty($list)) return [];
  24. return $list;
  25. }
  26. }