StoreProductAssistSet.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\controller\admin\store;
  12. use app\common\repositories\store\product\ProductAssistSetRepository as repository;
  13. use app\common\repositories\store\product\ProductAssistUserRepository;
  14. use app\common\repositories\system\CacheRepository;
  15. use crmeb\basic\BaseController;
  16. use think\App;
  17. use app\validate\merchant\StoreProductPresellValidate;
  18. class StoreProductAssistSet extends BaseController
  19. {
  20. protected $repository ;
  21. /**
  22. * Product constructor.
  23. * @param App $app
  24. * @param repository $repository
  25. */
  26. public function __construct(App $app ,repository $repository)
  27. {
  28. parent::__construct($app);
  29. $this->repository = $repository;
  30. }
  31. /**
  32. * TODO 列表
  33. * @return mixed
  34. * @author Qinii
  35. * @day 2020-10-12
  36. */
  37. public function lst()
  38. {
  39. [$page, $limit] = $this->getPage();
  40. $where = $this->request->params(['keyword','status','type','date','user_name','mer_id','is_trader']);
  41. return app('json')->success($this->repository->getAdminList($where,$page,$limit));
  42. }
  43. /**
  44. * TODO 详情
  45. * @param $id
  46. * @return mixed
  47. * @author Qinii
  48. * @day 2020-10-12
  49. */
  50. public function detail($id)
  51. {
  52. [$page, $limit] = $this->getPage();
  53. $where['product_assist_set_id'] = $id;
  54. $make = app()->make(ProductAssistUserRepository::class);
  55. return app('json')->success($make->userList($where,$page,$limit));
  56. }
  57. }