SelffetchVerifierController.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeshop100%开源免费商用商城系统
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | 商业版本务必购买商业授权,以免引起法律纠纷
  8. // | 禁止对系统程序代码以任何目的,任何形式的再发布
  9. // | gitee下载:https://gitee.com/likeshop_gitee
  10. // | github下载:https://github.com/likeshop-github
  11. // | 访问官网:https://www.likeshop.cn
  12. // | 访问社区:https://home.likeshop.cn
  13. // | 访问手册:http://doc.likeshop.cn
  14. // | 微信公众号:likeshop技术社区
  15. // | likeshop团队 版权所有 拥有最终解释权
  16. // +----------------------------------------------------------------------
  17. // | author: likeshopTeam
  18. // +----------------------------------------------------------------------
  19. namespace app\adminapi\controller\selffetch_shop;
  20. use app\adminapi\controller\BaseAdminController;
  21. use app\adminapi\lists\selffetch_shop\SelffetchVerifierLists;
  22. use app\adminapi\logic\selffetch_shop\SelffetchVerifierLogic;
  23. use app\adminapi\validate\selffetch_shop\SelffetchVerifierValidate;
  24. /**
  25. * 核销员控制器
  26. * Class SelffetchVerifierController
  27. * @package app\adminapi\controller\selffetch_shop
  28. */
  29. class SelffetchVerifierController extends BaseAdminController
  30. {
  31. /**
  32. * @notes 添加核销员
  33. * @return \think\response\Json
  34. * @author ljj
  35. * @date 2021/8/11 7:24 下午
  36. */
  37. public function add()
  38. {
  39. $params = (new SelffetchVerifierValidate())->post()->goCheck('add');
  40. (new SelffetchVerifierLogic())->add($params);
  41. return $this->success('添加成功',[],1,1);
  42. }
  43. /**
  44. * @notes 编辑核销员
  45. * @return \think\response\Json
  46. * @author ljj
  47. * @date 2021/8/11 7:37 下午
  48. */
  49. public function edit()
  50. {
  51. $params = (new SelffetchVerifierValidate())->post()->goCheck('edit');
  52. (new SelffetchVerifierLogic())->edit($params);
  53. return $this->success('修改成功',[],1,1);
  54. }
  55. /**
  56. * @notes 核销员详情
  57. * @return \think\response\Json
  58. * @throws \think\db\exception\DataNotFoundException
  59. * @throws \think\db\exception\DbException
  60. * @throws \think\db\exception\ModelNotFoundException
  61. * @author ljj
  62. * @date 2021/8/11 7:49 下午
  63. */
  64. public function detail()
  65. {
  66. $params = (new SelffetchVerifierValidate())->goCheck('detail');
  67. $result = (new SelffetchVerifierLogic())->detail($params);
  68. return $this->success('',$result);
  69. }
  70. /**
  71. * @notes 查看核销员列表
  72. * @return \think\response\Json
  73. * @author ljj
  74. * @date 2021/8/11 8:17 下午
  75. */
  76. public function lists()
  77. {
  78. return $this->dataLists(new SelffetchVerifierLists());
  79. }
  80. /**
  81. * @notes 修改核销员状态
  82. * @return \think\response\Json
  83. * @throws \think\db\exception\DataNotFoundException
  84. * @throws \think\db\exception\DbException
  85. * @throws \think\db\exception\ModelNotFoundException
  86. * @author ljj
  87. * @date 2021/8/11 8:21 下午
  88. */
  89. public function status()
  90. {
  91. $params = (new SelffetchVerifierValidate())->post()->goCheck('status');
  92. (new SelffetchVerifierLogic())->status($params);
  93. return $this->success('修改成功',[],1,1);
  94. }
  95. /**
  96. * @notes 删除核销员
  97. * @return \think\response\Json
  98. * @author ljj
  99. * @date 2021/8/11 8:27 下午
  100. */
  101. public function del()
  102. {
  103. // TODO 暂无限制,可以任意删除
  104. $params = (new SelffetchVerifierValidate())->post()->goCheck('del');
  105. (new SelffetchVerifierLogic())->del($params);
  106. return $this->success('删除成功',[],1,1);
  107. }
  108. }