Invent.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /*
  3. * @Author: wang jun
  4. * @Date: 2022-01-18 10:57:14
  5. * @Last Modified by: wang jun
  6. * @Last Modified time: 2022-01-19 15:22:04
  7. * 微信类
  8. */
  9. namespace app\index\controller;
  10. use app\index\logic\inventlogic;
  11. use think\Controller;
  12. class Invent extends Base
  13. {
  14. /**
  15. * 新建信息
  16. * 20220119
  17. * wj
  18. */
  19. public function newinfo()
  20. {
  21. $param = request()->param();
  22. $l_i = new inventlogic();
  23. $result = $l_i->newinfo($param);
  24. if (1 != $result['status']) {
  25. return backjson(0, $result['msg']);
  26. }
  27. return backjson(200, $result['data']);
  28. }
  29. /**
  30. * 获取数据根据id
  31. * 20220119
  32. * wj
  33. */
  34. public function getinfobyid()
  35. {
  36. $param = request()->param();
  37. $l_i = new inventlogic();
  38. $result = $l_i->getinfobyid($param);
  39. if (1 != $result['status']) {
  40. return backjson(0, $result['msg']);
  41. }
  42. return backjson(200, $result['data']);
  43. }
  44. /**
  45. * 获取列表根据id
  46. * 20220119
  47. * wj
  48. */
  49. public function getlist()
  50. {
  51. $param = request()->param();
  52. $l_i = new inventlogic();
  53. $result = $l_i->getlistbywhere($param);
  54. if (1 != $result['status']) {
  55. return backjson(0, $result['msg']);
  56. }
  57. return backjson(200, $result['data']);
  58. }
  59. /**
  60. * 修改数据根据id
  61. * 20220119
  62. * wj
  63. */
  64. public function updatebyid()
  65. {
  66. $param = request()->param();
  67. $l_i = new inventlogic();
  68. $result = $l_i->updatebyid($param);
  69. if (1 != $result['status']) {
  70. return backjson(0, $result['msg']);
  71. }
  72. return backjson(200, $result['data']);
  73. }
  74. }