EnterpriseCategory.Class.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * 企业类型
  4. * Created by PhpStorm.
  5. * User: wxj
  6. * Date: 2019/11/25
  7. * Time: 11:51
  8. */
  9. namespace Jindouyun\Controller\Common;
  10. use Exception;
  11. use Mall\Framework\Core\ErrorCode;
  12. use Mall\Framework\Factory;
  13. use JinDouYun\Controller\BaseController;
  14. use JinDouYun\Model\Enterprise\MEnterpriseCategory;
  15. class EnterpriseCategory extends BaseController
  16. {
  17. private $objMEnterpriseCategory;
  18. public function __construct($isCheckAcl = false, $isMustLogin = false, $checkToken = false)
  19. {
  20. parent::__construct($isCheckAcl, $isMustLogin, $checkToken);
  21. $this->objMEnterpriseCategory = new MEnterpriseCategory();
  22. }
  23. /**
  24. * 获取所有企业类型
  25. */
  26. public function getAllEnterpriseCategory()
  27. {
  28. $result = $this->objMEnterpriseCategory->getAllEnterpriseCategory();
  29. if ($result->isSuccess()) {
  30. parent::sendOutput($result->getData());
  31. } else {
  32. parent::sendOutput($result->getData(), $result->getErrorCode());
  33. }
  34. }
  35. }