feat(cache): 添加复合键缓存操作支持

添加了基于 uint32+string 组合键的缓存操作方法,包括
GetByCompoundKey、SetByCompoundKey、DelByCompoundKey 和
ContainsByCompoundKey 方法,用于处理用户ID和会话ID的组合缓存场景

fix(vscode): 添加 cSpell 配置支持 struc 词汇

refactor(session): 移除过时的会话管理方法

移除了基于单一字符串键的会话管理方法,因为已迁移到使用
复合键的缓存操作方式
```
This commit is contained in:
昔念
2026-01-19 18:51:56 +08:00
parent 08ebf849eb
commit 026689f3ed
120 changed files with 1428 additions and 629 deletions

View File

@@ -0,0 +1,34 @@
package model
// TeamInfo 战队信息结构
type TeamInfo struct {
//Head common.TomeeHeader `cmd:"1001" struc:"skip"` // 命令头
ID uint32 `struc:"uint32" default:"0"` // 默认值0
Priv uint32 `struc:"uint32" default:"1"` // 默认值1
SuperCore uint32 `struc:"uint32" default:"1"` // 默认值1
IsShow uint32 `struc:"uint32" default:"1"` // 默认值1
AllContribution uint32 `struc:"uint32" default:"1"` // 默认值1
CanExContribution uint32 `struc:"uint32" default:"1"` // 默认值1
}
// InitDefaults 初始化默认值
func (t *TeamInfo) InitDefaults() {
t.ID = 0
t.Priv = 1
t.SuperCore = 1
t.IsShow = 1
t.AllContribution = 1
t.CanExContribution = 1
}
// TeamPKInfo 战队PK相关信息结构
type TeamPKInfo struct {
GroupID uint32 `struc:"uint32" default:"1"` // 分组ID默认值1@UInt long
HomeTeamID uint32 `struc:"uint32" default:"1"` // 主队ID默认值1@UInt long
}
// InitDefaults 初始化默认值(确保字段默认值正确赋值)
func (t *TeamPKInfo) InitDefaults() {
t.GroupID = 1
t.HomeTeamID = 1
}