feat(cache): 添加复合键缓存操作支持 添加了基于 uint32+string 组合键的缓存操作方法,包括 GetByCompoundKey、SetByCompoundKey、DelByCompoundKey 和 ContainsByCompoundKey 方法,用于处理用户ID和会话ID的组合缓存场景 fix(vscode): 添加 cSpell 配置支持 struc 词汇 refactor(session): 移除过时的会话管理方法 移除了基于单一字符串键的会话管理方法,因为已迁移到使用 复合键的缓存操作方式 ```
46 lines
1.2 KiB
Go
46 lines
1.2 KiB
Go
package item
|
||
|
||
import (
|
||
"blazing/logic/service/common"
|
||
"blazing/modules/player/model"
|
||
)
|
||
|
||
// 实现了入站消息接口(Go中通过方法集隐式实现)
|
||
type ItemListInboundInfo struct {
|
||
Head common.TomeeHeader `cmd:"2605|4475" struc:"skip"`
|
||
// 查询物品id的开始,
|
||
Param1 uint32
|
||
// 查询物品id的结尾
|
||
Param2 uint32
|
||
// 默认值2
|
||
Param3 uint32
|
||
}
|
||
|
||
type ItemListOutboundInfo struct {
|
||
// 物品列表,
|
||
ItemListLen uint32 `struc:"sizeof=ItemList"`
|
||
ItemList []model.SingleItemInfo
|
||
}
|
||
|
||
type GoldOnlineRemainInboundInfo struct {
|
||
Head common.TomeeHeader `cmd:"1105|1106" struc:"skip"`
|
||
}
|
||
|
||
type GoldOnlineRemainOutboundInfo struct {
|
||
// GoldNumber 金豆数量(后端返回实际数量需要*100)
|
||
GoldNumber uint32 `json:"goldNumber" `
|
||
Coin uint32
|
||
}
|
||
|
||
// ExpTotalRemainInboundInfo 累计经验相关的入站信息
|
||
type ExpTotalRemainInboundInfo struct {
|
||
// Head 消息头部信息,cmd保持原标识(如需调整可根据实际需求修改)
|
||
Head common.TomeeHeader `cmd:"2319" struc:"skip"`
|
||
}
|
||
|
||
// ExpTotalRemainOutboundInfo 累计经验相关的出站信息
|
||
type ExpTotalRemainOutboundInfo struct {
|
||
// TotalExp 累计经验值(根据实际业务需求确定是否需要倍率转换)
|
||
TotalExp uint32 `json:"totalExp" `
|
||
}
|