MasterWorkerExamineController.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeadmin快速开发前后端分离管理后台(PHP版)
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
  8. // | github下载:https://github.com/likeshop-github/likeadmin
  9. // | 访问官网:https://www.likeadmin.cn
  10. // | likeadmin团队 版权所有 拥有最终解释权
  11. // +----------------------------------------------------------------------
  12. // | author: likeadminTeam
  13. // +----------------------------------------------------------------------
  14. namespace app\adminapi\controller\master_worker;
  15. use app\adminapi\controller\BaseAdminController;
  16. use app\adminapi\lists\master_worker\MasterWorkerAgreeLists;
  17. use app\adminapi\lists\master_worker\MasterWorkerExamineLists;
  18. use app\adminapi\logic\master_worker\MasterWorkerAgreeLogic;
  19. use app\adminapi\logic\master_worker\MasterWorkerExamineLogic;
  20. use app\adminapi\validate\master_worker\MasterWorkerAgreeValidate;
  21. /**
  22. * MasterWorkerExamine控制器
  23. * Class MasterWorkerExamineController
  24. * @package app\adminapi\controller\master_worker
  25. */
  26. class MasterWorkerExamineController extends BaseAdminController
  27. {
  28. /**
  29. * @notes 获取列表
  30. * @return \think\response\Json
  31. * @author likeadmin
  32. * @date 2024/07/17 15:20
  33. */
  34. public function lists()
  35. {
  36. return $this->dataLists(new MasterWorkerExamineLists());
  37. }
  38. /**
  39. * @notes 添加
  40. * @return \think\response\Json
  41. * @author likeadmin
  42. * @date 2024/07/17 15:20
  43. */
  44. public function add()
  45. {
  46. return $this->fail('');
  47. }
  48. /**
  49. * @notes 编辑
  50. * @return \think\response\Json
  51. * @author likeadmin
  52. * @date 2024/07/17 15:20
  53. */
  54. public function edit()
  55. {
  56. $params = $this->request->post();
  57. $result = MasterWorkerExamineLogic::edit($params);
  58. if (true === $result) {
  59. return $this->success('编辑成功', [], 1, 1);
  60. }
  61. return $this->fail(MasterWorkerExamineLogic::getError());
  62. }
  63. /**
  64. * @notes 删除
  65. * @return \think\response\Json
  66. * @author likeadmin
  67. * @date 2024/07/17 15:20
  68. */
  69. public function delete()
  70. {
  71. $params = (new MasterWorkerAgreeValidate())->post()->goCheck('delete');
  72. MasterWorkerAgreeLogic::delete($params);
  73. return $this->success('删除成功', [], 1, 1);
  74. }
  75. /**
  76. * @notes 获取详情
  77. * @return \think\response\Json
  78. * @author likeadmin
  79. * @date 2024/07/17 15:20
  80. */
  81. public function detail()
  82. {
  83. $params = (new MasterWorkerAgreeValidate())->goCheck('detail');
  84. $result = MasterWorkerAgreeLogic::detail($params);
  85. return $this->data($result);
  86. }
  87. public function getStatus()
  88. {
  89. $data_rules = $this->adminInfo['data_rules']??[];
  90. $result = MasterWorkerAgreeLogic::getStatus($data_rules);
  91. return $this->data(['count'=>$result]);
  92. }
  93. }