diff --git a/app/Service/JclqService.php b/app/Service/JclqService.php index 6d3f6e88..3be33d2e 100755 --- a/app/Service/JclqService.php +++ b/app/Service/JclqService.php @@ -30,6 +30,7 @@ use App\Model\Seller\Seller; use App\Utils\Helps; use App\Utils\ThrowException; use Illuminate\Support\Arr; +use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Log; @@ -436,6 +437,19 @@ class JclqService implements IJingcai */ public function validZuHe($allowPlanNum, $data, $combinationLen=2) { + + $inputData = []; + foreach ($data as $id => $item) { + if (count($item) == 1) { + $itemValues = array_values($item); + if (isset($itemValues[0]) && count($itemValues[0]) == 1) { + continue; + } + } + $inputData[$id] = $item; + } + $data = $inputData; + $oddsMatch = $this->generateCombinationInput($data); $zuhes = Helps::getCombinationData($oddsMatch, $combinationLen); if (count($zuhes) > $allowPlanNum) { diff --git a/app/Service/JczqService.php b/app/Service/JczqService.php index 9d8d9220..4d955871 100755 --- a/app/Service/JczqService.php +++ b/app/Service/JczqService.php @@ -23,6 +23,7 @@ use App\Model\Zq\JczqResult; use App\Utils\Helps; use App\Utils\ThrowException; use Illuminate\Support\Arr; +use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Log; @@ -1006,6 +1007,19 @@ class JczqService implements IJingcai */ public function validZuHe($allowPlanNum, $data, $combinationLen=2) { + + $inputData = []; + foreach ($data as $id => $item) { + if (count($item) == 1) { + $itemValues = array_values($item); + if (isset($itemValues[0]) && count($itemValues[0]) == 1) { + continue; + } + } + $inputData[$id] = $item; + } + $data = $inputData; + $oddsMatch = $this->generateCombinationInput($data); $zuhes = Helps::getCombinationData($oddsMatch, $combinationLen); if (count($zuhes) > $allowPlanNum) {