MEnterpriseCategory.Class.php 991 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * 企业分类
  4. * Created by PhpStorm.
  5. * User: wxj
  6. * Date: 2019/11/25
  7. * Time: 11:45
  8. */
  9. namespace JinDouYun\Model\Enterprise;
  10. use Mall\Framework\Core\ErrorCode;
  11. use Mall\Framework\Core\StatusCode;
  12. use Mall\Framework\Core\ResultWrapper;
  13. use JinDouYun\Dao\Enterprise\DEnterpriseCategory;
  14. class MEnterpriseCategory
  15. {
  16. private $objDEnterpriseCategory;
  17. public function __construct()
  18. {
  19. $this->objDEnterpriseCategory = new DEnterpriseCategory('default');
  20. }
  21. /**
  22. * 查出所有企业分类
  23. * @return ResultWrapper
  24. * @throws \Exception
  25. */
  26. public function getAllEnterpriseCategory()
  27. {
  28. $selectParams['deleteStatus'] = StatusCode::$standard;
  29. $dbResult = $this->objDEnterpriseCategory->select($selectParams);
  30. if ($dbResult === false) {
  31. return ResultWrapper::fail($this->objDEnterpriseCategory->error(), ErrorCode::$dberror);
  32. }
  33. return ResultWrapper::success($dbResult);
  34. }
  35. }