Active.php 697 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\store\model\sharing;
  3. use app\common\model\sharing\Active as ActiveModel;
  4. /**
  5. * 拼团拼单模型
  6. * Class Active
  7. * @package app\store\model\sharing
  8. */
  9. class Active extends ActiveModel
  10. {
  11. /**
  12. * 获取拼单列表
  13. * @param null $active_id
  14. * @return \think\Paginator
  15. * @throws \think\exception\DbException
  16. */
  17. public function getList($active_id = null)
  18. {
  19. $active_id > 0 && $this->where('active_id', '=', $active_id);
  20. return $this->with(['goods.image.file', 'user'])
  21. ->order(['create_time' => 'desc'])
  22. ->paginate(15, false, [
  23. 'query' => request()->request()
  24. ]);
  25. }
  26. }