FormData.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * Niushop商城系统 - 团队十年电商经验汇集巨献!
  4. * =========================================================
  5. * Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
  6. * ----------------------------------------------
  7. * 官方网址: https://www.niushop.com
  8. * =========================================================
  9. */
  10. namespace addon\form\model;
  11. use app\model\BaseModel;
  12. /**
  13. * 表单数据
  14. */
  15. class FormData extends BaseModel
  16. {
  17. /**
  18. * 获取表单数据分页列表
  19. * @param $condition
  20. * @param $field
  21. * @param $order
  22. * @param $page
  23. * @param $limit
  24. * @param $alias
  25. * @param $join
  26. * @return array
  27. */
  28. public function getFormDataPageList($condition, $field, $order, $page, $limit, $alias, $join)
  29. {
  30. $list = model('form_data')->pageList($condition, $field, $order, $page, $limit, $alias, $join);
  31. return $this->success($list);
  32. }
  33. /**
  34. * 查询表单数据
  35. * @param array $where
  36. * @param bool $field
  37. * @param string $alias
  38. * @param null $join
  39. * @return array
  40. */
  41. public function getFormDataInfo($where = [], $field = true, $alias = 'a', $join = null)
  42. {
  43. $info = model('form_data')->getInfo($where, $field, $alias, $join);
  44. return $this->success($info);
  45. }
  46. /**
  47. * 删除表单数据
  48. * @param array $condition
  49. * @return array
  50. */
  51. public function deleteFormData($condition = [])
  52. {
  53. $res = model('form_data')->delete($condition);
  54. if ($res) {
  55. return $this->success($res);
  56. } else {
  57. return $this->error($res);
  58. }
  59. }
  60. }