store_navigation.model.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. /**
  3. * 店铺导航模型
  4. *
  5. *
  6. *
  7. *
  8. */
  9. defined('InShopNC') or exit('Access Invalid!');
  10. class store_navigationModel extends Model{
  11. public function __construct(){
  12. parent::__construct('store_navigation');
  13. }
  14. /**
  15. * 读取列表
  16. * @param array $condition
  17. *
  18. */
  19. public function getStoreNavigationList($condition, $page='', $order='', $field='*') {
  20. $result = $this->field($field)->where($condition)->page($page)->order($order)->select();
  21. return $result;
  22. }
  23. /**
  24. * 读取单条记录
  25. * @param array $condition
  26. *
  27. */
  28. public function getStoreNavigationInfo($condition) {
  29. $result = $this->where($condition)->find();
  30. return $result;
  31. }
  32. /*
  33. * 增加
  34. * @param array $param
  35. * @return bool
  36. */
  37. public function addStoreNavigation($param){
  38. return $this->insert($param);
  39. }
  40. /*
  41. * 更新
  42. * @param array $update
  43. * @param array $condition
  44. * @return bool
  45. */
  46. public function editStoreNavigation($update, $condition){
  47. return $this->where($condition)->update($update);
  48. }
  49. /*
  50. * 删除
  51. * @param array $condition
  52. * @return bool
  53. */
  54. public function delStoreNavigation($condition){
  55. return $this->where($condition)->delete();
  56. }
  57. }