优化结构

This commit is contained in:
Yvan
2026-08-20 20:39:09 +08:00
parent b88c220e20
commit 01b5c2f78a
73 changed files with 3171 additions and 794 deletions
+6
View File
@@ -48,6 +48,12 @@ func (r *paymentOrderRepoStub) FindPaymentOrder(context.Context, string, string)
}
return r.order, nil
}
func (r *paymentOrderRepoStub) ListPaymentOrders(context.Context, int, int, PaymentOrderFilter) ([]*PaymentOrder, int64, error) {
if r.order == nil {
return []*PaymentOrder{}, 0, nil
}
return []*PaymentOrder{r.order}, 1, nil
}
func (r *paymentOrderRepoStub) RecordPaymentCreate(_ context.Context, _, _ string, update *PaymentProviderUpdate) (*PaymentOrder, error) {
r.order.PaymentStatus = PaymentStatusPending
r.order.CreatePayload = append(r.order.CreatePayload[:0], update.CreatePayload...)