超过25万条
This commit is contained in:
parent
6fe67edbec
commit
814d1ff546
@ -3,6 +3,7 @@ namespace App\Domains\Virtual\Http\Controllers;
|
||||
|
||||
use App\Core\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Exceptions\NotAllowedException;
|
||||
use App\Domains\Virtual\Exports\CardExport;
|
||||
use App\Domains\Virtual\Services\CardService;
|
||||
use App\Domains\Export\Services\ExportService;
|
||||
@ -57,6 +58,10 @@ class CardController extends Controller
|
||||
$conditions['type'] = 0;
|
||||
$total = app(OrderCardPartitionRepository::class)->withConditions($conditions)->applyConditions()->count();
|
||||
|
||||
if ($total > 250000) {
|
||||
throw new NotAllowedException('一次性导出数据超过25万条,请添加筛选条件后重试');
|
||||
}
|
||||
|
||||
try {
|
||||
$export = new CardExport($conditions);
|
||||
$queue = $total > 30000;
|
||||
|
Loading…
x
Reference in New Issue
Block a user