feat: realistic face avatar + voice input + ASR endpoint
This commit is contained in:
@@ -168,6 +168,8 @@ export class PaymentController {
|
||||
order.wxTransactionId = wxTransactionId
|
||||
order.description = `${decrypted.trade_type || ''} 支付成功`
|
||||
await order.save()
|
||||
} else {
|
||||
return { code: 'SUCCESS', message: '已处理' }
|
||||
}
|
||||
|
||||
if (order.type === 'membership') {
|
||||
@@ -260,6 +262,15 @@ export class PaymentController {
|
||||
return { success: true, plan: order.plan }
|
||||
}
|
||||
|
||||
// For product orders, check if already activated via callback
|
||||
const user = await this.userModel.findById(userId).exec()
|
||||
if (user && order.type === 'interview' && (user.interviewCredits || 0) > 0) {
|
||||
return { success: true, type: order.type, alreadyActivated: true }
|
||||
}
|
||||
if (user && order.type === 'optimize' && (user.resumeOptimizeCredits || 0) > 0) {
|
||||
return { success: true, type: order.type, alreadyActivated: true }
|
||||
}
|
||||
|
||||
await this.activateProduct(order)
|
||||
return { success: true, type: order.type }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user