store_reopen.model.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. /**
  3. * 店铺续签
  4. *
  5. */
  6. defined('InShopNC') or exit('Access Invalid!');
  7. class store_reopenModel extends Model {
  8. public function __construct() {
  9. parent::__construct('store_reopen');
  10. }
  11. /**
  12. * 取得列表
  13. * @param unknown $condition
  14. * @param string $pagesize
  15. * @param string $order
  16. */
  17. public function getStoreReopenList($condition = array(), $pagesize = '', $order = 're_id desc') {
  18. return $this->where($condition)->order($order)->page($pagesize)->select();
  19. }
  20. /**
  21. * 增加新记录
  22. * @param unknown $data
  23. * @return
  24. */
  25. public function addStoreReopen($data) {
  26. return $this->insert($data);
  27. }
  28. /**
  29. * 取单条信息
  30. * @param unknown $condition
  31. */
  32. public function getStoreReopenInfo($condition) {
  33. return $this->where($condition)->find();
  34. }
  35. /**
  36. * 更新记录
  37. * @param unknown $condition
  38. * @param unknown $data
  39. */
  40. public function editStoreReopen($data,$condition) {
  41. return $this->where($condition)->update($data);
  42. }
  43. /**
  44. * 取得数量
  45. * @param unknown $condition
  46. */
  47. public function getStoreReopenCount($condition) {
  48. return $this->where($condition)->count();
  49. }
  50. /**
  51. * 删除记录
  52. * @param unknown $condition
  53. */
  54. public function delStoreReopen($condition) {
  55. return $this->where($condition)->delete();
  56. }
  57. }