OutUserLevelServices.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. declare (strict_types = 1);
  12. namespace app\services\user;
  13. use app\services\BaseServices;
  14. use app\dao\user\UserLevelDao;
  15. use app\services\system\SystemUserLevelServices;
  16. /**
  17. * 用户等级
  18. * Class OutUserLevelServices
  19. * @package app\services\user
  20. */
  21. class OutUserLevelServices extends BaseServices
  22. {
  23. /**
  24. * OutUserLevelServices constructor.
  25. * @param UserLevelDao $dao
  26. */
  27. public function __construct(UserLevelDao $dao)
  28. {
  29. $this->dao = $dao;
  30. }
  31. /**
  32. * 会员列表
  33. * @param array $where
  34. * @return array
  35. */
  36. public function levelList(array $where): array
  37. {
  38. /** @var SystemUserLevelServices $systemLevelServices */
  39. $systemLevelServices = app()->make(SystemUserLevelServices::class);
  40. $field = 'id, name, grade, discount, image, icon, explain, exp_num, is_show, add_time';
  41. return $systemLevelServices->getLevelList($where, $field);
  42. }
  43. }