You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UserUserBrokerageServices.php 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. declare (strict_types=1);
  3. namespace app\services\user;
  4. use app\services\BaseServices;
  5. use app\dao\user\UserUserBrokerageDao;
  6. /**
  7. * 用户关联佣金
  8. * Class UserUserBrokerageServices
  9. * @package app\services\user
  10. */
  11. class UserUserBrokerageServices extends BaseServices
  12. {
  13. /**
  14. * UserUserBrokerageServices constructor.
  15. * @param UserUserBrokerageDao $dao
  16. */
  17. public function __construct(UserUserBrokerageDao $dao)
  18. {
  19. $this->dao = $dao;
  20. }
  21. /**
  22. * 获取佣金列表
  23. * @param array $where
  24. * @param string $field
  25. * @param string $order
  26. * @param int $limit
  27. * @return array
  28. */
  29. public function getBrokerageList(array $where, string $field = '*', string $order = '', int $limit = 0)
  30. {
  31. if ($limit) {
  32. [$page] = $this->getPageValue();
  33. } else {
  34. [$page, $limit] = $this->getPageValue();
  35. }
  36. $list = $this->dao->getList($where, $field, $order, $page, $limit);
  37. $count = $this->dao->getCount($where);
  38. return [$count, $list];
  39. }
  40. }