feat(payment): add chat support discounts and gratitude
Docker Image / Build and Push Docker Image (push) Successful in 3m1s
Docker Image / Build and Push Docker Image (push) Successful in 3m1s
(cherry picked from commit ef9b79bc83)
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user