Store.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2017~2021 https://www.yiovo.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
  8. // +----------------------------------------------------------------------
  9. // | Author: 萤火科技 <admin@yiovo.com>
  10. // +----------------------------------------------------------------------
  11. declare (strict_types = 1);
  12. namespace app\console\model;
  13. use app\common\model\Store as StoreModel;
  14. /**
  15. * 商家记录表模型
  16. * Class Store
  17. * @package app\admin\model
  18. */
  19. class Store extends StoreModel
  20. {
  21. /**
  22. * 获取商城ID集
  23. * @param bool $isRecycle
  24. * @return array
  25. */
  26. public static function getStoreIds(bool $isRecycle = false)
  27. {
  28. $static = new static;
  29. return $static->where('is_recycle', '=', (int)$isRecycle)
  30. ->where('is_delete', '=', 0)
  31. ->order(['create_time' => 'desc', $static->getPk()])
  32. ->column('store_id');
  33. }
  34. }