['<=', $time], 'end_time' => ['>=', $time], ]; $where = ActivityRewardService::getWhere($params); $query = ActivityRewardModel::where($where); $list = $query->orderByDesc('id')->get()->toArray(); } catch (ValidationException $e) { return $this->error($e->validator->errors()->first()); } catch (Exception $e) { return $this->error($e->getMessage()); } return $this->success($list); } }