repository = $repository; } public function lst() { $id = $this->request->param('product_id',0); $where = [ 'status' => 1, 'is_show'=> 1, 'end_time' => 1, 'is_del' => 0, ]; if ($id){ $discount_id = app()->make(StoreDiscountProductRepository::class) ->getSearch(['product_id' => $id]) ->column('discount_id'); $where['discount_id'] = $discount_id; } $data = $this->repository->getApilist($where); return app('json')->success($data); } }