mb_feedback.model.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * 意见反馈
  4. *
  5. *
  6. *
  7. *
  8. */
  9. defined('InShopNC') or exit('Access Invalid!');
  10. class mb_feedbackModel extends Model{
  11. public function __construct(){
  12. parent::__construct('mb_feedback');
  13. }
  14. /**
  15. * 列表
  16. *
  17. * @param array $condition 查询条件
  18. * @param int $page 分页数
  19. * @param string $order 排序
  20. * @return array
  21. */
  22. public function getMbFeedbackList($condition, $page = null, $order = 'id desc'){
  23. $list = $this->where($condition)->page($page)->order($order)->select();
  24. return $list;
  25. }
  26. /**
  27. * 新增
  28. *
  29. * @param array $param 参数内容
  30. * @return bool 布尔类型的返回结果
  31. */
  32. public function addMbFeedback($param){
  33. return $this->insert($param);
  34. }
  35. /**
  36. * 删除
  37. *
  38. * @param int $id 记录ID
  39. * @return bool 布尔类型的返回结果
  40. */
  41. public function delMbFeedback($id){
  42. $condition = array('id' => array('in', $id));
  43. return $this->where($condition)->delete();
  44. }
  45. }