appointmentlogic.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace app\app\logic;
  3. use app\index\model\appointmentmodel;
  4. /**
  5. * 登记记录表
  6. *
  7. * @author wj
  8. * @date 2022-07-22
  9. */
  10. class appointmentlogic extends baselogic
  11. {
  12. /**
  13. * 设置请求数据规则
  14. * 20220107
  15. * wj
  16. */
  17. protected function setrules()
  18. {
  19. $list = [
  20. 'getlastinfo' => [
  21. ['name' => 'code', 'title' => '申请编码', 'require' => true, 'type' => 'string'],
  22. ],
  23. /*'saveinfo' => [
  24. ['name' => 'openid', 'title' => 'openid', 'require' => true, 'type' => 'string'],
  25. ['name' => 'union_id', 'title' => 'union_id', 'require' => false, 'type' => 'string'],
  26. ['name' => 'nick_name', 'title' => '昵称', 'require' => true, 'type' => 'string'],
  27. ['name' => 'avatar_url', 'title' => '头像', 'require' => false, 'type' => 'string'],
  28. ['name' => 'gender', 'title' => '性别', 'require' => false, 'type' => 'string'],
  29. ['name' => 'province', 'title' => '省', 'require' => false, 'type' => 'string'],
  30. ['name' => 'city', 'title' => '市', 'require' => false, 'type' => 'string'],
  31. ['name' => 'country', 'title' => '县', 'require' => false, 'type' => 'string'],
  32. ['name' => 'tel', 'title' => '手机号', 'require' => false, 'type' => 'string'],
  33. ['name' => 'address', 'title' => '地址', 'require' => false, 'type' => 'string'],
  34. ],*/
  35. ];
  36. return $list;
  37. }
  38. /**
  39. * 获取用户当日申请最后一条数据
  40. *
  41. * @param [type] $arr
  42. * @return void
  43. * @author wj
  44. * @date 2022-07-22
  45. */
  46. public function getlastinfo($arr)
  47. {
  48. $m_a = new appointmentmodel();
  49. $info = $m_a->getlastinfo($arr);
  50. if (empty($info)) {
  51. return backarr(0, "无申请数据");
  52. }
  53. return backarr(1, "查询成功", $info);
  54. }
  55. }