fix: 修复权益等级奖励领取优惠券状态错误

This commit is contained in:
zpc 2026-02-12 01:34:20 +08:00
parent ae25832ee1
commit 14ebb2221e
2 changed files with 4 additions and 4 deletions

View File

@ -216,8 +216,8 @@ public class QuanYiService : IQuanYiService
EndTime = endTime,
CreatedAt = DateTime.UtcNow,
CouponId = reward.Id,
State = ttype ?? 0,
Status = 1,
State = 0, // State字段未使用
Status = 0, // 0=未使用/可用, 1=已使用, 2=已过期
Ttype = ttype ?? 0
};
_dbContext.CouponReceives.Add(couponReceive);

View File

@ -44,12 +44,12 @@ public partial class CouponReceife
public int? CouponId { get; set; }
/// <summary>
/// 状态: 0禁用 1启用
/// 使用状态: 0未使用/可用 1已使用 2已过期
/// </summary>
public byte Status { get; set; }
/// <summary>
/// 使用状态: 0未使用 1已使用
/// 状态(未使用字段,保留兼容)
/// </summary>
public byte? State { get; set; }