feat: 激活码与VIP充值支持按天计费

- 新增 VIP 天数概念,支持月数与天数组合计算过期时间
- 激活码商品新增 VipDays 配置,并新增 1 天会员试用组合包
- VIP 充值统一按天数计算(1 个月 = 31 天),兼容原有逻辑
- 激活码兑换时支持仅天数或天月组合的 VIP 充值
This commit is contained in:
ccnetcore
2025-12-28 17:44:33 +08:00
parent bdaa53bac8
commit 4b9f845fae
4 changed files with 37 additions and 11 deletions

View File

@@ -92,7 +92,7 @@ public class ActivationCodeService : ApplicationService, IActivationCodeService
isCreateRechargeRecord: !goods.IsCombo);
}
if (goods.VipMonths > 0)
if (goods.VipMonths > 0 || goods.VipDays > 0)
{
await _rechargeService.RechargeVipAsync(new RechargeCreateInput
{
@@ -100,6 +100,7 @@ public class ActivationCodeService : ApplicationService, IActivationCodeService
RechargeAmount = totalAmount,
Content = packageName,
Months = goods.VipMonths,
Days = goods.VipDays,
Remark = "激活码兑换",
ContactInfo = null
});