手机号核销确认

This commit is contained in:
2026-07-12 10:34:58 +08:00
parent 7f031cc4c2
commit d949301bc1
17 changed files with 1285 additions and 215 deletions
@@ -3,6 +3,10 @@ import { PrismaService } from '../../common/prisma/prisma.module';
import { RedeemService } from '../redeem/redeem.service';
import type {
AdminRedeemDebugCreateTokenDto,
AdminRedeemDebugPhoneBalanceDto,
AdminRedeemDebugPhoneConfirmDto,
AdminRedeemDebugPhonePrepareDto,
AdminRedeemDebugPhoneStoreDto,
AdminRedeemDebugStoreTokenDto,
} from './dto/admin-mutate.dto';
@@ -80,4 +84,24 @@ export class AdminRedeemDebugService {
const storeAccountId = await this.resolveStoreAccountId(dto.storeId);
return this.redeemService.confirmRedeem(storeAccountId, { token: dto.token });
}
async sendPhoneLookupSms(dto: AdminRedeemDebugPhoneStoreDto) {
const storeAccountId = await this.resolveStoreAccountId(dto.storeId);
return this.redeemService.sendPhoneLookupSms(storeAccountId, dto.phone);
}
async phoneBalance(dto: AdminRedeemDebugPhoneBalanceDto) {
const storeAccountId = await this.resolveStoreAccountId(dto.storeId);
return this.redeemService.verifyPhoneAndGetBalance(storeAccountId, dto.phone, dto.code);
}
async phonePrepare(dto: AdminRedeemDebugPhonePrepareDto) {
const storeAccountId = await this.resolveStoreAccountId(dto.storeId);
return this.redeemService.preparePhoneRedeem(storeAccountId, dto.sessionId, dto.amount);
}
async phoneConfirm(dto: AdminRedeemDebugPhoneConfirmDto) {
const storeAccountId = await this.resolveStoreAccountId(dto.storeId);
return this.redeemService.confirmPhoneRedeem(storeAccountId, dto.sessionId, dto.code);
}
}