AdminClass.php 872 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace biz\admin\classes;
  3. use biz\base\classes\BaseClass;
  4. class AdminClass extends BaseClass
  5. {
  6. public static $baseFile = '\biz\admin\models\Admin';
  7. const STYLE_GHS = 2;
  8. const STYLE_HD = 1;
  9. const OPEN_SHOP_NO = 1;
  10. const OPEN_SHOP_CHECK = 2;
  11. const OPEN_SHOP_YES = 3;
  12. const SUPER_YES = 1;
  13. const SUPER_NO = 0;
  14. //lqh 2021.5.14 [id=>adminData]
  15. public static function getAdminMap($adminIds)
  16. {
  17. $where = [];
  18. $where['id'] = ['in', $adminIds];
  19. $data = self::getAllByCondition($where, null, "*");
  20. return array_column($data, null, "id");
  21. }
  22. //获取平台的超级管理员 ssh 20231005
  23. public static function getPtSuperAdminId()
  24. {
  25. $adminId = 919;
  26. if (getenv('YII_ENV') == 'production') {
  27. $adminId = 4;
  28. }
  29. return $adminId;
  30. }
  31. }