feat(upserver): 接入认证与KV存档并完成限定钓鱼闭环

This commit is contained in:
Liubing\LB
2026-09-28 18:14:01 +08:00
parent f40a816cc4
commit 0eb43b2b40
129 changed files with 11612 additions and 573 deletions

View File

@@ -24,7 +24,7 @@ namespace EventPartnerGather
public class PartnerInfoManager : IDisposable
{
// [Inject]
private static Tables _tables { get; set; } = GContext.container.Resolve<Tables>();
private readonly Tables _tables = GContext.container.Resolve<Tables>();
private FriendService _friendService { get; set; } = GContext.container.Resolve<FriendService>();
private IUserService _userService { get; } = GContext.container.Resolve<IUserService>();
@@ -41,9 +41,15 @@ namespace EventPartnerGather
public int EventId { get; set; }
//
public static readonly int BuilderCapacity = _tables.TbEventPartnerConfig.InvitationCount[1];
// D4: current-context read. Unlike the old field, this is not frozen across configuration changes.
public static int BuilderCapacity => GContext.container.Resolve<Tables>().TbEventPartnerConfig.InvitationCount[1];
public readonly BuildPartner[] BuildPartners = new BuildPartner[BuilderCapacity];
public readonly BuildPartner[] BuildPartners;
public PartnerInfoManager()
{
BuildPartners = new BuildPartner[_tables.TbEventPartnerConfig.InvitationCount[1]];
}
internal bool HasSubscriptionsForKVLoad => disposables != null;
//
public bool IsFullyMatched => BuildPartners.All(b => b != null && b.IsValid());
@@ -387,9 +393,9 @@ namespace EventPartnerGather
public bool AddBuildPartner(BuildPartner buildPartner)
{
var index = buildPartner.SlotId;
if (index >= BuilderCapacity)
if (index >= BuildPartners.Length)
{
LogWarning($"AddBuildPartnerFailed eventId={EventId} reason=SlotOutOfRange slotId={index} capacity={BuilderCapacity}");
LogWarning($"AddBuildPartnerFailed eventId={EventId} reason=SlotOutOfRange slotId={index} capacity={BuildPartners.Length}");
return false;
}
@@ -475,4 +481,4 @@ namespace EventPartnerGather
}
}
}