StoreProductAssistSet.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace app\controller\admin\store;
  3. use app\common\repositories\store\product\ProductAssistSetRepository as repository;
  4. use app\common\repositories\store\product\ProductAssistUserRepository;
  5. use app\common\repositories\system\CacheRepository;
  6. use ln\basic\BaseController;
  7. use think\App;
  8. use app\validate\merchant\StoreProductPresellValidate;
  9. class StoreProductAssistSet extends BaseController
  10. {
  11. protected $repository ;
  12. /**
  13. * Product constructor.
  14. * @param App $app
  15. * @param repository $repository
  16. */
  17. public function __construct(App $app ,repository $repository)
  18. {
  19. parent::__construct($app);
  20. $this->repository = $repository;
  21. }
  22. /**
  23. * TODO 列表
  24. * @return mixed
  25. * @author Qinii
  26. * @day 2020-10-12
  27. */
  28. public function lst()
  29. {
  30. [$page, $limit] = $this->getPage();
  31. $where = $this->request->params(['keyword','status','type','date','user_name','mer_id','is_trader']);
  32. return app('json')->success($this->repository->getAdminList($where,$page,$limit));
  33. }
  34. /**
  35. * TODO 详情
  36. * @param $id
  37. * @return mixed
  38. * @author Qinii
  39. * @day 2020-10-12
  40. */
  41. public function detail($id)
  42. {
  43. [$page, $limit] = $this->getPage();
  44. $where['product_assist_set_id'] = $id;
  45. $make = app()->make(ProductAssistUserRepository::class);
  46. return app('json')->success($make->userList($where,$page,$limit));
  47. }
  48. }