CityRepository.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\common\repositories\store\shipping;
  12. use app\common\repositories\BaseRepository;
  13. use app\common\dao\store\shipping\CityDao as dao;
  14. class CityRepository extends BaseRepository
  15. {
  16. public function __construct(dao $dao)
  17. {
  18. $this->dao = $dao;
  19. }
  20. /**
  21. * @Author:Qinii
  22. * @Date: 2020/5/8
  23. * @return array
  24. */
  25. public function getFormatList( array $where)
  26. {
  27. return formatCategory($this->dao->getAll($where)->toArray(), 'city_id','parent_id');
  28. }
  29. }