澄清批量治理无回执广义筛选提示口径
This commit is contained in:
@@ -1610,7 +1610,7 @@ class PlatformOrderController extends Controller
|
||||
if ($scope === 'filtered'
|
||||
&& ($filters['syncable_only'] ?? '') === '1'
|
||||
&& ((string) ($filters['receipt_status'] ?? '') === 'none')) {
|
||||
return redirect()->back()->with('warning', '当前筛选为「无回执」订单集合。为保证收费闭环可治理,请先补齐支付回执留痕后再批量同步订阅。');
|
||||
return redirect()->back()->with('warning', '当前筛选为「无回执(广义)」订单集合。为保证收费闭环可治理,请先补齐支付回执留痕后再批量同步订阅。');
|
||||
}
|
||||
|
||||
// 防误操作(口径一致):当用户显式传入了 status/payment_status 时,要求口径至少锁定「已支付+已生效」
|
||||
@@ -1939,7 +1939,7 @@ class PlatformOrderController extends Controller
|
||||
|
||||
// 治理优先:当用户显式筛选「无回执」时,不允许直接批量生效
|
||||
if ((string) ($filters['receipt_status'] ?? '') === 'none') {
|
||||
return redirect()->back()->with('warning', '当前筛选为「无回执」订单集合。为保证收费闭环可治理,请先补齐支付回执留痕后再执行批量仅标记为已生效。');
|
||||
return redirect()->back()->with('warning', '当前筛选为「无回执(广义)」订单集合。为保证收费闭环可治理,请先补齐支付回执留痕后再执行批量仅标记为已生效。');
|
||||
}
|
||||
|
||||
// 治理优先:当用户显式筛选「有退款」时,不允许直接批量生效
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminPlatformOrderBatchSyncWarningsShouldClarifyBroadReceiptNoneScopeTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
protected function loginAsPlatformAdmin(): void
|
||||
{
|
||||
$this->seed();
|
||||
|
||||
$this->post('/admin/login', [
|
||||
'email' => 'platform.admin@demo.local',
|
||||
'password' => 'Platform@123456',
|
||||
])->assertRedirect('/admin');
|
||||
}
|
||||
|
||||
public function test_batch_activate_subscriptions_warning_should_clarify_broad_receipt_none_scope(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$syncRes = $this->post('/admin/platform-orders/batch-activate-subscriptions', [
|
||||
'scope' => 'filtered',
|
||||
'receipt_status' => 'none',
|
||||
'syncable_only' => '1',
|
||||
]);
|
||||
$syncRes->assertRedirect();
|
||||
$syncRes->assertSessionHas('warning');
|
||||
$this->assertStringContainsString('无回执(广义)', (string) session('warning'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user