SystemNoticeLogRepository.php 745 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\common\repositories\system\notice;
  3. use app\common\dao\system\notice\SystemNoticeLogDao;
  4. use app\common\repositories\BaseRepository;
  5. /**
  6. * Class SystemNoticeLogRepository
  7. * @package app\common\repositories\system\notice
  8. * @author zfy
  9. * @day 2020/11/6
  10. * @mixin SystemNoticeLogDao
  11. */
  12. class SystemNoticeLogRepository extends BaseRepository
  13. {
  14. public function __construct(SystemNoticeLogDao $dao)
  15. {
  16. $this->dao = $dao;
  17. }
  18. public function getList(array $where, $page, $limit)
  19. {
  20. $query = $this->dao->search($where);
  21. $count = $query->count();
  22. $list = $query->page($page, $limit)->order('A.notice_log_id DESC')->select();
  23. return compact('count', 'list');
  24. }
  25. }