feat(payment): add chat support discounts and gratitude
Docker Image / Build and Push Docker Image (push) Successful in 3m1s

(cherry picked from commit ef9b79bc83)
This commit is contained in:
Codex
2026-07-28 17:42:53 +08:00
parent e43912eebf
commit 9121b50e02
35 changed files with 768 additions and 56 deletions
+11 -3
View File
@@ -24,10 +24,18 @@ export class PaymentRepository implements IPaymentRepository {
constructor(private readonly api: PaymentApi) {}
/** 获取套餐列表。 */
async getPlans(commercialOfferId?: string): Promise<Result<PaymentPlansResponse>> {
async getPlans(
commercialOfferId?: string,
supportCharacterId?: string,
): Promise<Result<PaymentPlansResponse>> {
return Result.wrap(async () => {
const response = await this.api.getPlans(commercialOfferId);
if (!commercialOfferId) await PaymentPlansStorage.setPlans(response);
const response = await this.api.getPlans(
commercialOfferId,
supportCharacterId,
);
if (!commercialOfferId && !supportCharacterId) {
await PaymentPlansStorage.setPlans(response);
}
return response;
});
}