feat: subscription row renew link prefill remark quantity

This commit is contained in:
萝卜
2026-03-13 23:09:10 +00:00
parent 41992a4d9e
commit 06646146c8
2 changed files with 5 additions and 0 deletions

View File

@@ -190,9 +190,12 @@
@endphp
<a href="{!! $subShowUrl !!}">{{ $subscription->subscription_no }}</a>
@php
$remarkPrefix = (string) config('saasshop.platform_orders.renewal_order_remark_prefix', '来自订阅:');
$q = [
'order_type' => 'renewal',
'site_subscription_id' => $subscription->id,
'quantity' => 1,
'remark' => $remarkPrefix . $subscription->subscription_no,
'back' => $back,
];
if ((int) ($subscription->merchant_id ?? 0) > 0) {

View File

@@ -84,6 +84,8 @@ class AdminSiteSubscriptionIndexRowRenewOrderLinkTest extends TestCase
&& (string) ($q['site_subscription_id'] ?? '') === (string) $sub->id
&& (string) ($q['merchant_id'] ?? '') === (string) $merchant->id
&& (string) ($q['plan_id'] ?? '') === (string) $plan->id
&& (string) ($q['quantity'] ?? '') === '1'
&& str_contains((string) ($q['remark'] ?? ''), $sub->subscription_no)
&& (string) ($q['back'] ?? '') === $selfWithoutBack) {
$found = true;
// 防 back 嵌套