input('is_fadan'); $idList = Lottery::active() ->where('shop_id', $this->customerShopId()) ->pluck('lottery_type_id') ->toArray(); if (!$idList) { return $this->jsonSuccess(); } $query = LotteryType::whereIn('id', $idList) ->where('status', BoolEnum::YES); if ($isFadan) { $query->whereIn('type', [LottType::JCZQ, LottType::JCLQ]); } $lotteryTypes = $query->get(); return $this->jsonSuccess($lotteryTypes); } }