ApiEnterprise.Class.php 971 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace JinDouYun\Controller\Enterprise;
  3. use JinDouYun\Controller\BaseController;
  4. use JinDouYun\Model\Enterprise\MEnterprise;
  5. /**
  6. * Class ApiEnterprise
  7. * @package JinDouYun\Controller\Enterprise
  8. */
  9. class ApiEnterprise extends BaseController
  10. {
  11. private $objMEnterprise;
  12. public function __construct($isCheckAcl = false, $isMustLogin = false, $checkToken = true, $getAreaCode = false)
  13. {
  14. parent::__construct($isCheckAcl, $isMustLogin, $checkToken, $getAreaCode);
  15. $this->objMEnterprise = new MEnterprise();
  16. }
  17. /**
  18. * @throws \Exception
  19. */
  20. public function getEnterpriseInfo()
  21. {
  22. $params['enterpriseId'] = $this->onlineEnterpriseId;
  23. $result = $this->objMEnterprise->getEnterpriseInfo($params);
  24. if ($result->isSuccess()) {
  25. parent::sendOutput($result->getData());
  26. } else {
  27. parent::sendOutput($result->getData(), $result->getErrorCode());
  28. }
  29. }
  30. }