GoodsSupplierController.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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\goods;
  20. use app\adminapi\controller\BaseAdminController;
  21. use app\adminapi\lists\goods\GoodsSupplierLists;
  22. use app\adminapi\logic\goods\GoodsSupplierLogic;
  23. use app\adminapi\validate\goods\GoodsSupplierValidate;
  24. class GoodsSupplierController extends BaseAdminController
  25. {
  26. /**
  27. * @notes 添加供应商
  28. * @return \think\response\Json
  29. * @author ljj
  30. * @date 2021/7/17 11:46
  31. */
  32. public function add()
  33. {
  34. $params = (new GoodsSupplierValidate())->post()->goCheck('add');
  35. (new GoodsSupplierLogic())->add($params);
  36. return $this->success('供应商添加成功',[],1,1);
  37. }
  38. /**
  39. * @notes 查看供应商列表
  40. * @return \think\response\Json
  41. * @author ljj
  42. * @date 2021/7/17 2:11
  43. */
  44. public function lists()
  45. {
  46. return $this->dataLists(new GoodsSupplierLists());
  47. }
  48. /**
  49. * @notes 删除供应商
  50. * @return \think\response\Json
  51. * @author ljj
  52. * @date 2021/7/17 2:46
  53. */
  54. public function del()
  55. {
  56. $params = (new GoodsSupplierValidate())->post()->goCheck('del');
  57. (new GoodsSupplierLogic())->del($params);
  58. return $this->success('供应商删除成功',[],1,1);
  59. }
  60. /**
  61. * @notes 编辑供应商
  62. * @return \think\response\Json
  63. * @author ljj
  64. * @date 2021/7/17 3:18 下午
  65. */
  66. public function edit()
  67. {
  68. $params = (new GoodsSupplierValidate())->post()->goCheck('edit');
  69. (new GoodsSupplierLogic())->edit($params);
  70. return $this->success('供应商修改成功',[],1,1);
  71. }
  72. /**
  73. * @notes 查看供应商详情
  74. * @return \think\response\Json
  75. * @author ljj
  76. * @date 2021/7/19 4:56 下午
  77. */
  78. public function detail()
  79. {
  80. $params = (new GoodsSupplierValidate())->goCheck('detail');
  81. $result = (new GoodsSupplierLogic())->detail($params);
  82. return $this->success('供应商详情获取成功',$result,1,0);
  83. }
  84. }