SeckillTime.php 808 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace app\controller\merchant\store\seckill;
  3. use crmeb\basic\BaseController;
  4. use app\common\repositories\store\StoreSeckillTimeRepository;
  5. use think\App;
  6. class SeckillTime extends BaseController
  7. {
  8. protected $repository;
  9. /**
  10. * SeckillActive constructor.
  11. * @param App $app
  12. * @param StoreSeckillTimeRepository $repository
  13. */
  14. public function __construct(App $app ,StoreSeckillTimeRepository $repository)
  15. {
  16. parent::__construct($app);
  17. $this->repository = $repository;
  18. }
  19. /**
  20. * 获取秒杀场次列表
  21. * @return void
  22. * FerryZhao 2024/4/19
  23. */
  24. public function lst()
  25. {
  26. $activeId = $this->request->param('active_id') ?: null;
  27. return app('json')->success($this->repository->select($activeId));
  28. }
  29. }