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

@@ -3,17 +3,18 @@ package task
import (
"blazing/common/data"
"blazing/modules/blazing/model"
"blazing/modules/config/service"
"blazing/modules/player/model"
)
type TaskResult struct {
Pet *model.PetInfo `json:"petTypeId" description:"发放的精灵ID"` // 发放的精灵ID
ItemList []data.ItemInfo `json:"itemList" description:"发放物品的数组"` // 发放物品的数组,
Title uint32 `json:"title" description:"称号奖励"`
}
func GetTaskInfo(id, ot uint32) *TaskResult {
func GetTaskInfo(id, ot int) *TaskResult {
ret := &TaskResult{}
r := service.NewTaskService().Get(id, ot)
@@ -30,6 +31,10 @@ func GetTaskInfo(id, ot uint32) *TaskResult {
iteminfo := service.NewItemService().GetItemCount(itemID)
ret.ItemList = append(ret.ItemList, data.ItemInfo{ItemId: iteminfo.ItemId, ItemCnt: iteminfo.ItemCnt})
}
if r.TitleRewardIds != 0 {
ret.Title = r.TitleRewardIds
}
return ret