ServiceChargeController.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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\agricultural_machinery;
  15. use app\adminapi\controller\BaseAdminController;
  16. use app\adminapi\logic\agricultural_machinery\ServiceChargeLogic;
  17. use app\adminapi\validate\agricultural_machinery\ServiceChargeValidate;
  18. /**
  19. * 农机手管理控制器
  20. * Class ArticleController
  21. * @package app\adminapi\controller\article
  22. */
  23. class ServiceChargeController extends BaseAdminController
  24. {
  25. /**
  26. * @notes 编辑
  27. * @return \think\response\Json
  28. * @author heshihu
  29. * @date 2022/2/22 10:12
  30. */
  31. public function edit()
  32. {
  33. $params = (new ServiceChargeValidate())->post()->goCheck();
  34. $result = ServiceChargeLogic::edit($params);
  35. if (true === $result) {
  36. return $this->success('编辑成功', [], 1, 1);
  37. }
  38. return $this->fail(ServiceChargeLogic::getError());
  39. }
  40. /**
  41. * @notes 查看详情
  42. * @return \think\response\Json
  43. * @author heshihu
  44. * @date 2022/2/22 10:15
  45. */
  46. public function detail()
  47. {
  48. $result = ServiceChargeLogic::detail();
  49. return $this->data($result);
  50. }
  51. }