ApiClassSetting.Class.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * 分类设置
  4. * Created by PhpStorm.
  5. * User: 小威
  6. * Date: 2020/03/10
  7. * Time: 09:45
  8. */
  9. namespace JinDouYun\Controller\System;
  10. use JinDouYun\Controller\BaseController;
  11. use JinDouYun\Model\System\MClassSetting;
  12. class ApiClassSetting extends BaseController
  13. {
  14. private $objMClassSetting;
  15. /**
  16. * TemplateModule constructor.
  17. * @param bool $isCheckAcl
  18. * @param bool $isMustLogin
  19. */
  20. public function __construct($isCheckAcl = false, $isMustLogin = false)
  21. {
  22. parent::__construct($isCheckAcl, $isMustLogin);
  23. $authorization = $this->request->getServerParam('HTTP_AUTHORIZATION');
  24. if (!empty($authorization)) {
  25. self::getUserIdByAuthorization();
  26. }
  27. $this->objMClassSetting = new MClassSetting($this->onlineUserId, $this->onlineEnterpriseId);
  28. }
  29. /**
  30. * 获取分类设置
  31. */
  32. public function getClassSettingInfo()
  33. {
  34. $selectParams = [
  35. 'enterpriseId' => $this->onlineEnterpriseId,
  36. ];
  37. $modelResult = $this->objMClassSetting->getClassSettingInfo($selectParams);
  38. if (!$modelResult->isSuccess()) {
  39. parent::sendOutput($modelResult->getData(), $modelResult->getErrorCode());
  40. }
  41. parent::sendOutput($modelResult->getData());
  42. }
  43. }