GoodsSettingsController.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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\settings\goods;
  20. use app\adminapi\controller\BaseAdminController;
  21. use app\adminapi\logic\settings\goods\GoodsSettingsLogic;
  22. use app\adminapi\validate\settings\goods\GoodsSettingsValidate;
  23. class GoodsSettingsController extends BaseAdminController
  24. {
  25. /**
  26. * @notes 设置商品配置
  27. * @author ljj
  28. * @date 2021/7/26 5:46 下午
  29. */
  30. public function setConfig()
  31. {
  32. $params = (new GoodsSettingsValidate())->post()->goCheck();
  33. (new GoodsSettingsLogic())->setConfig($params);
  34. return $this->success('设置成功',[],1, 1);
  35. }
  36. /**
  37. * @notes 查看商品配置
  38. * @return \think\response\Json
  39. * @author ljj
  40. * @date 2021/7/26 6:04 下午
  41. */
  42. public function getConfig()
  43. {
  44. $result = (new GoodsSettingsLogic())->getConfig();
  45. return $this->success('获取成功',$result);
  46. }
  47. /**
  48. * @notes 设置商品采集配置
  49. * @return \think\response\Json
  50. * @author ljj
  51. * @date 2023/3/16 6:19 下午
  52. */
  53. public function setGatherKey()
  54. {
  55. $params = (new GoodsSettingsValidate())->post()->goCheck();
  56. (new GoodsSettingsLogic())->setGatherKey($params);
  57. return $this->success('设置成功',[],1, 1);
  58. }
  59. /**
  60. * @notes 获取商品采集配置
  61. * @return \think\response\Json
  62. * @author ljj
  63. * @date 2023/3/16 6:19 下午
  64. */
  65. public function getGatherKey()
  66. {
  67. $result = (new GoodsSettingsLogic())->getGatherKey();
  68. return $this->success('获取成功',$result);
  69. }
  70. }