StoreProductAssistSet.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2024 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. /**
  19. * 助力活动记录
  20. */
  21. class StoreProductAssistSet extends BaseController
  22. {
  23. protected $repository;
  24. /**
  25. * Product constructor.
  26. * @param App $app
  27. * @param repository $repository
  28. */
  29. public function __construct(App $app, repository $repository)
  30. {
  31. parent::__construct($app);
  32. $this->repository = $repository;
  33. }
  34. /**
  35. * 列表
  36. * @return mixed
  37. * @author Qinii
  38. * @day 2020-10-12
  39. */
  40. public function lst()
  41. {
  42. [$page, $limit] = $this->getPage();
  43. $where = $this->request->params(['keyword', 'status', 'type', 'date', 'user_name', 'mer_id', 'is_trader']);
  44. return app('json')->success($this->repository->getAdminList($where, $page, $limit));
  45. }
  46. /**
  47. * 详情
  48. * @param $id
  49. * @return mixed
  50. * @author Qinii
  51. * @day 2020-10-12
  52. */
  53. public function detail($id)
  54. {
  55. [$page, $limit] = $this->getPage();
  56. $where['product_assist_set_id'] = $id;
  57. $make = app()->make(ProductAssistUserRepository::class);
  58. return app('json')->success($make->userList($where, $page, $limit));
  59. }
  60. }