diff --git a/common/data/xmlres/file.go b/common/data/xmlres/file.go index 846818aaf..7480ef3bd 100644 --- a/common/data/xmlres/file.go +++ b/common/data/xmlres/file.go @@ -39,7 +39,7 @@ var ( MapConfig Maps //地图配置 // ItemsConfig Items //物品配置 // EffectArgsConfig EffectArg //arg参数 - TalkConfig TalkRoot //任务配置 + //TalkConfig TalkRoot //任务配置 // //Monster MonsterRoot //野怪配置 MonsterMap map[int]TMapConfig //Skill MovesTbl //技能配置 @@ -71,7 +71,7 @@ func Initfile() { }) - TalkConfig = getXml[TalkRoot](path + "talk.xml") + //TalkConfig = getXml[TalkRoot](path + "talk.xml") MonsterMap = utils.ToMap(getXml[MonsterRoot](path+"地图配置野怪.xml").Maps, func(m TMapConfig) int { return m.ID diff --git a/logic/controller/fight_boss.go b/logic/controller/fight_boss.go index 6efb36d7e..aa3108d81 100644 --- a/logic/controller/fight_boss.go +++ b/logic/controller/fight_boss.go @@ -186,8 +186,8 @@ func (h Controller) OnPlayerFightNpcMonster(data *fight.FightNpcMonsterInboundIn EXP: exp * 2, } if refpet.Item != 0 { - - items.ItemList = c.ItemAdd(model.ItemInfo{ + c.ItemAdd(refpet.Item, uint32(grand.Intn(2)+1)) + items.ItemList = append(items.ItemList, model.ItemInfo{ ItemId: refpet.Item, ItemCnt: uint32(grand.Intn(2) + 1), }) diff --git a/logic/controller/item_buy.go b/logic/controller/item_buy.go index 18d2f076f..176319ff2 100644 --- a/logic/controller/item_buy.go +++ b/logic/controller/item_buy.go @@ -6,7 +6,6 @@ import ( "blazing/logic/service/item" "blazing/logic/service/player" - "blazing/modules/blazing/model" "github.com/gogf/gf/v2/util/gconv" ) @@ -15,8 +14,8 @@ func (h Controller) BuyItem(data *item.BuyInboundInfo, c *player.Player) (result tt, ok := xmlres.ItemsMAP[int(data.ItemId)] if ok && tt.Price != 0 && c.UseCoins(data.Count*uint32(tt.Price)) { - r := c.ItemAdd(model.ItemInfo{ItemId: data.ItemId, ItemCnt: data.Count}) - if len(r) != 0 { + r := c.ItemAdd(data.ItemId, data.Count) + if r { return &item.BuyOutboundInfo{ ItemId: data.ItemId, Level: 1, @@ -25,6 +24,7 @@ func (h Controller) BuyItem(data *item.BuyInboundInfo, c *player.Player) (result }, 0 } //购买失败,返还豆子 + c.Info.Coins += data.Count * uint32(tt.Price) } @@ -34,22 +34,22 @@ func (h Controller) BuyItem(data *item.BuyInboundInfo, c *player.Player) (result }, 0 } func (h Controller) BuyMItem(data *item.BuyMultiInboundInfo, c *player.Player) (result *item.BuyMultiOutboundInfo, err errorcode.ErrorCode) { - var rrr []model.ItemInfo + for _, v := range data.ItemIds { - _, ok := xmlres.ItemsMAP[int(v)] + iteminfo, ok := xmlres.ItemsMAP[int(v)] if ok { - rrr = append(rrr, model.ItemInfo{ItemId: uint32(v), ItemCnt: 1}) + if !c.UseCoins(uint32(iteminfo.Price)) { + break + } + if c.ItemAdd(v, 1) { + c.Info.Coins -= uint32(iteminfo.Price) + + } } } - r := c.ItemAdd(rrr...) - if len(r) != 0 { - return &item.BuyMultiOutboundInfo{ - Coins: c.Info.Coins, - }, 0 - } return &item.BuyMultiOutboundInfo{ Coins: c.Info.Coins, @@ -57,22 +57,25 @@ func (h Controller) BuyMItem(data *item.BuyMultiInboundInfo, c *player.Player) ( } func (h Controller) BuyGoldItem(data *item.C2S_GOLD_BUY_PRODUCT, c *player.Player) (result *item.S2C_GoldBuyProductInfo, err errorcode.ErrorCode) { r := xmlres.GoldProductMap[int(data.ProductID)] - - if !c.UseGold(uint32(data.Count) * uint32(gconv.Uint32(r.Price)*100)) { + usegold := uint32(data.Count) * uint32(gconv.Uint32(r.Price)*100) + if !c.UseGold(usegold) { return nil, errorcode.ErrorCodes.ErrSystemError } - r1 := c.ItemAdd(model.ItemInfo{ItemId: uint32(gconv.Uint32(r.ItemID)), ItemCnt: uint32(data.Count)}) - isbuycot := len(r1) - - usegold := uint32(uint32(len(r1))) * uint32(gconv.Uint32(r.Price)*100) - c.User.SetGold(c.Info.UserID, c.User.GetGold(uint(c.Info.UserID))-usegold) + isbuycot := c.ItemAdd(uint32(gconv.Uint32(r.ItemID)), uint32(data.Count)) + if isbuycot { + c.User.SetGold(c.Info.UserID, c.User.GetGold(uint(c.Info.UserID))-usegold) + result = &item.S2C_GoldBuyProductInfo{ + Gold: c.User.GetGold(uint(c.Info.UserID)), + PayGold: usegold, + Reserved: 0, + } + } result = &item.S2C_GoldBuyProductInfo{ Gold: c.User.GetGold(uint(c.Info.UserID)), - PayGold: uint32(isbuycot) * uint32(gconv.Uint32(r.Price)), + PayGold: 0, Reserved: 0, } - return } diff --git a/logic/controller/nono.go b/logic/controller/nono.go index 20375ee7d..a2f5a241f 100644 --- a/logic/controller/nono.go +++ b/logic/controller/nono.go @@ -62,5 +62,6 @@ func (h *Controller) PlayerPetCure(data *nono.PetCureInboundInfo, c *player.Play c.Info.PetList[i].Cure() } + c.Info.Coins -= 50 return } diff --git a/logic/controller/pet_skill.go b/logic/controller/pet_skill.go index 4ca26d03e..32bbab6f7 100644 --- a/logic/controller/pet_skill.go +++ b/logic/controller/pet_skill.go @@ -14,7 +14,7 @@ func (h Controller) SetPetSkill(data *pet.ChangeSkillInfo, c *player.Player) (re if !c.UseCoins(100) { return result, errorcode.ErrorCodes.ErrSystemBusy } - + c.Info.Coins -= 50 _, onpet, ok := c.FindPet(data.CatchTime) if !ok { return result, errorcode.ErrorCodes.ErrSystemBusy @@ -42,6 +42,7 @@ func (h Controller) Skill_Sort(data *pet.C2S_Skill_Sort, c *player.Player) (resu if !c.UseCoins(100) { return result, errorcode.ErrorCodes.ErrSystemBusy } + c.Info.Coins -= 50 _, onpet, ok := c.FindPet(data.CapTm) if ok { var newskill []model.SkillInfo diff --git a/logic/controller/talk.go b/logic/controller/talk.go index 590bae317..958ce9258 100644 --- a/logic/controller/talk.go +++ b/logic/controller/talk.go @@ -1,72 +1,54 @@ package controller import ( - "blazing/common/data/xmlres" "blazing/common/socket/errorcode" "blazing/logic/service/item" "blazing/logic/service/player" - "blazing/modules/blazing/model" + "blazing/modules/blazing/service" + dict "blazing/modules/dict/service" + + "github.com/gogf/gf/v2/util/gconv" "github.com/gogf/gf/v2/util/grand" ) func (h Controller) Talk(data *item.TalkCountInboundInfo, c *player.Player) (result *item.TalkCountOutboundInfo, err errorcode.ErrorCode) { result = &item.TalkCountOutboundInfo{} - c.Service.Talk.Exec(func(t map[uint32]uint32) bool { - - tt, ok := t[data.ID] - if ok { - result.GiftCount = tt - } - return false - }) + cid, ok := c.Service.Talk.Cheak(c.Info.MapID, int(data.ID)) + if !ok { + return result, errorcode.ErrorCodes.ErrResourceUnavailable + } + result.GiftCount = uint32(cid) return result, 0 } -var talkcacche = make(map[string]uint32) +//var talkcacche = make(map[string]uint32) func (h Controller) TalkCate(data *item.TalkCateInboundInfo, c *player.Player) (result *item.DayTalkInfo, err errorcode.ErrorCode) { result = &item.DayTalkInfo{} result.OutList = make([]item.CateInfo, 0) - for _, te := range xmlres.TalkConfig.Energies { - if te.MapID == uint64(c.Info.MapID) && te.Type == uint64(data.ID) { // - - _, ok := talkcacche[te.Name] - if !ok { - for _, v := range xmlres.ItemsMAP { - if v.Name == te.Name { - talkcacche[te.Name] = uint32(v.ID) - - } - - } - } - - randomNum := grand.Intn(10) + 1 - c.Service.Talk.Exec(func(t map[uint32]uint32) bool { - if t == nil { - t = make(map[uint32]uint32) - - } - _, ok := t[data.ID] - if !ok { - t[data.ID] = 0 - } - - t[data.ID] += 1 - if t[data.ID] < uint32(te.CollectCnt) { - result.OutList = append(result.OutList, item.CateInfo{ID: uint32(talkcacche[te.Name]), Count: uint32(randomNum)}) - c.ItemAdd(model.ItemInfo{ItemId: uint32(talkcacche[te.Name]), ItemCnt: uint32(randomNum)}) - } - - return true - }) - - break - } + _, ok := c.Service.Talk.Cheak(c.Info.MapID, int(data.ID)) + if !ok { + return result, errorcode.ErrorCodes.ErrResourceUnavailable } + //更新次数 + config := service.TalkConfigServiceS.GetCache(int(data.ID)) + + for _, v := range config { + count := grand.N(int(v.ItemMinCount), int(v.ItemMaxCount)) + + r := dict.DictInfoServiceS.DataID("fusion") + trueitemid := gconv.Uint32(r[gconv.Uint32(v.ItemID)].Remark) + ret := c.ItemAdd(trueitemid, uint32(count)) + if ret { + result.OutList = append(result.OutList, item.CateInfo{ID: trueitemid, Count: uint32(count)}) + + } + } + + c.Service.Talk.Update(int(data.ID)) return result, 0 } diff --git a/logic/controller/task.go b/logic/controller/task.go index 8f6fc217e..563f3ffa7 100644 --- a/logic/controller/task.go +++ b/logic/controller/task.go @@ -6,8 +6,6 @@ import ( "blazing/logic/service/player" "blazing/logic/service/task" "blazing/modules/blazing/model" - - "github.com/jinzhu/copier" ) /** @@ -74,7 +72,6 @@ func (h Controller) Complete_Task(data *task.CompleteTaskInboundInfo, c *player. if tt == nil { return result, 0 //通过PUB/SUB回包 } - result.ItemList = tt.ItemList if tt.PetTypeId != 0 { r := model.GenPetInfo(int(tt.PetTypeId), 31, -1, 0, 0, 50) @@ -84,9 +81,13 @@ func (h Controller) Complete_Task(data *task.CompleteTaskInboundInfo, c *player. result.CaptureTime = r.CatchTime //这个写到后面,方便捕捉时间被修改后造成的时间不对问题 } - ret := c.ItemAdd(result.ItemList...) //获取成功的条目 + for _, v := range tt.ItemList { + ret := c.ItemAdd(v.ItemId, v.ItemCnt) //获取成功的条目 + if ret { + result.ItemList = append(result.ItemList, v) + } - copier.CopyWithOption(&result.ItemList, &ret, copier.Option{IgnoreEmpty: true, DeepCopy: true}) + } return result, 0 //通过PUB/SUB回包 } diff --git a/logic/controller/user.go b/logic/controller/user.go index c213a3a68..430697490 100644 --- a/logic/controller/user.go +++ b/logic/controller/user.go @@ -66,6 +66,7 @@ func (h Controller) ChangePlayerColor(data *user.ChangeColorInboundInfo, c *play if !c.UseCoins(200) { //如果花不了200,直接返回 return } + c.Info.Coins -= 50 c.Info.Color = data.Color c.Info.Texture = 0 result = &user.ChangeColorOutboundInfo{ @@ -82,6 +83,7 @@ func (h Controller) ChangePlayerDoodle(data *user.ChangeDoodleInboundInfo, c *pl if !c.UseCoins(200) { //如果花不了200,直接返回 return } + c.Info.Coins -= 50 c.Info.Texture = data.Id c.Info.Color = data.Color result = &user.ChangeDoodleOutboundInfo{ diff --git a/logic/service/player/player.go b/logic/service/player/player.go index a02ee1593..f4d80e2be 100644 --- a/logic/service/player/player.go +++ b/logic/service/player/player.go @@ -12,7 +12,6 @@ import ( "sync/atomic" "blazing/modules/base/service" - "blazing/modules/blazing/model" blservice "blazing/modules/blazing/service" "context" @@ -84,7 +83,7 @@ func (p *Player) UseCoins(t uint32) bool { if p.Info.Coins < t { return false } - p.Info.Coins = p.Info.Coins - t + return true } @@ -282,56 +281,50 @@ func replaceOneNumber(original [3]int) ([3]int, int, int) { } // 添加物品 返回成功添加的物品 -func (p *Player) ItemAdd(t ...model.ItemInfo) (result []model.ItemInfo) { - var ttt []model.ItemInfo - for _, v := range t { +func (p *Player) ItemAdd(ItemId, ItemCnt uint32) (result bool) { - switch v.ItemId { - case 1: //塞尔豆 - p.Info.Coins = p.Info.Coins + v.ItemCnt + switch ItemId { + case 1: //塞尔豆 + p.Info.Coins = p.Info.Coins + ItemCnt + return true + case 3: //累计经验 + p.Info.ExpPool = p.Info.ExpPool + ItemCnt + return true - case 3: //累计经验 - p.Info.ExpPool = p.Info.ExpPool + v.ItemCnt + case 5: //金豆ItemAdd + p.User.SetGold(p.Info.UserID, uint32(p.User.GetGold(uint(p.Info.UserID))+ItemCnt*100)) + return true - case 5: //金豆ItemAdd - p.User.SetGold(p.Info.UserID, uint32(p.User.GetGold(uint(p.Info.UserID))+v.ItemCnt*100)) - - default: - ttt = append(ttt, v) - } - - } - - for _, v := range ttt { - itemx, ok := xmlres.ItemsMAP[int(v.ItemId)] + default: + itemx, ok := xmlres.ItemsMAP[int(ItemId)] if !ok { - cool.Loger.Error(context.TODO(), "物品不存在", v.ItemId) + cool.Loger.Error(context.TODO(), "物品不存在", ItemId) t1 := common.NewTomeeHeader(2601, p.Info.UserID) t1.Result = uint32(errorcode.ErrorCodes.ErrSystemError200007) p.SendPack(t1.Pack(nil)) //准备包由各自发,因为协议不一样 - continue + return false + } if itemx.Max == 0 { itemx.Max = 1 } - if p.Service.Item.CheakItem(v.ItemId)+v.ItemCnt > uint32(itemx.Max) { + if p.Service.Item.CheakItem(ItemId)+ItemCnt > uint32(itemx.Max) { - println(p.Info.UserID, "物品超过拥有最大限制", v.ItemId) + println(p.Info.UserID, "物品超过拥有最大限制", ItemId) t1 := common.NewTomeeHeader(2601, p.Info.UserID) t1.Result = uint32(errorcode.ErrorCodes.ErrTooManyOfItem) p.SendPack(t1.Pack(nil)) //准备包由各自发,因为协议不一样 - continue + return false } - p.Service.Item.AddItem(v.ItemId, v.ItemCnt) - result = append(result, v) - + p.Service.Item.AddItem(ItemId, ItemCnt) + return true } - return + return false } func (player1 *Player) Kick() { diff --git a/modules/blazing/model/talk.go b/modules/blazing/model/talk.go index d7acc7926..443f28b16 100644 --- a/modules/blazing/model/talk.go +++ b/modules/blazing/model/talk.go @@ -57,16 +57,16 @@ func (*Talk) GroupName() string { // } // } -// ResourceConfig 资源配置信息(对应XML中的配置) -type ResourceConfig struct { - Type uint32 `json:"type"` // 资源类型ID - MapID uint32 `json:"map_id"` // 所在地图ID - Name string `json:"name"` // 资源名称 - CollectType string `json:"collect_type"` // 采集类型 - MaxDailyCnt uint32 `json:"max_daily_cnt"` // 每日最大采集次数 - Unit string `json:"unit"` // 单位 - Dir uint32 `json:"dir"` // 方向 -} +// // ResourceConfig 资源配置信息(对应XML中的配置) +// type ResourceConfig struct { +// Type uint32 `json:"type"` // 资源类型ID +// MapID uint32 `json:"map_id"` // 所在地图ID +// Name string `json:"name"` // 资源名称 +// CollectType string `json:"collect_type"` // 采集类型 +// MaxDailyCnt uint32 `json:"max_daily_cnt"` // 每日最大采集次数 +// Unit string `json:"unit"` // 单位 +// Dir uint32 `json:"dir"` // 方向 +// } // 初始化创建表 func init() { diff --git a/modules/blazing/service/pet_fusion_material_service.go b/modules/blazing/service/pet_fusion_material_service.go index 484c7e548..eed6d84ff 100644 --- a/modules/blazing/service/pet_fusion_material_service.go +++ b/modules/blazing/service/pet_fusion_material_service.go @@ -1,10 +1,8 @@ package service import ( - "blazing/common/utils" "blazing/cool" "blazing/modules/blazing/model" - dictmodel "blazing/modules/dict/model" "blazing/modules/dict/service" "context" "strings" @@ -38,11 +36,8 @@ func (s *PetFusionMaterialService) Data(Material1 [4]uint32) uint32 { cacheKey := strings.Join(gconv.Strings(Material1[:]), ":") println(cacheKey, "获取融合id") + fusions := service.DictInfoServiceS.DataRemark("fusion") - fusions := utils.ToMap(service.NewDictInfoService().DataOne("fusion"), func(t dictmodel.DictInfo) uint32 { - - return gconv.Uint32(t.Remark) //物品id转id - }) for _, v := range Material1 { _, ok := fusions[v] if !ok { @@ -70,15 +65,13 @@ func (s *PetFusionMaterialService) Data(Material1 [4]uint32) uint32 { return effect, nil }, 0) - effect2s := utils.ToMap(service.NewDictInfoService().DataOne("effect"), func(t dictmodel.DictInfo) uint32 { - - return gconv.Uint32(t.ID) - }) + effect2s := service.DictInfoServiceS.DataID("effect") effect := ret.Interface().(*model.PetFusionMaterial) if err != nil { - r := grand.Intn(len(service.NewDictInfoService().DataOne("effect")) - 1) - return gconv.Uint32(service.NewDictInfoService().DataOne("effect")[r].Remark) + for _, v := range effect2s { + return gconv.Uint32(v.Remark) + } } r := grand.Intn(4) diff --git a/modules/blazing/service/talk.go b/modules/blazing/service/talk.go index 5d88d7a58..dffb9bbd7 100644 --- a/modules/blazing/service/talk.go +++ b/modules/blazing/service/talk.go @@ -3,6 +3,7 @@ package service import ( "blazing/cool" "blazing/modules/blazing/model" + "blazing/modules/dict/service" ) type TalkService struct { @@ -22,23 +23,34 @@ func NewTalkService(id uint32) *TalkService { //实现挖矿次数确认 -func (s *TalkService) Cheak(flag int) bool { +func (s *TalkService) Cheak(mapid uint32, flag int) (int, bool) { m1 := s.GModel(s.Model) var talks *model.Talk m1.Where("talk_id", flag).Scan(&talks) if talks == nil { - return true //如果表里没有记载数据,那么就可以直接挖矿 + return 0, true //如果表里没有记载数据,那么就可以直接挖矿 } + //因为这个是挖一次更新一次,而且是实时更新的,如果更新日期是今天,那么就可以确认不用再重置,否则就需要重置挖矿记录 if !IsToday(talks.UpdateTime) { talks.Count = 0 m1.Save(talks) - return true + return int(talks.Count), true } + maps := service.DictInfoServiceS.DataRemark("mapid") + + if uint32(maps[mapid].ID) != TalkConfigServiceS.GetCache(flag)[0].MapID { + return 0, false //没在地图 + } + if talks.Count >= TalkConfigServiceS.GetCache(flag)[0].DailyCollectCount { + return 0, false + } + return int(talks.Count), true //int(config.MaxDailyCnt - talks.Count) + } func (s *TalkService) Update(flag int) { diff --git a/modules/blazing/service/talkconfig.go b/modules/blazing/service/talkconfig.go index 34dbd0ed9..13d061fb7 100644 --- a/modules/blazing/service/talkconfig.go +++ b/modules/blazing/service/talkconfig.go @@ -11,6 +11,8 @@ type TalkConfigService struct { *cool.Service } +var TalkConfigServiceS = NewTalkConfigService() + func NewTalkConfigService() *TalkConfigService { return &TalkConfigService{ @@ -19,3 +21,10 @@ func NewTalkConfigService() *TalkConfigService { } } + +func (s *TalkConfigService) GetCache(flag int) []model.MineralCollectionConfig { + var config []model.MineralCollectionConfig + cool.DBM(s.Model).Where("type", flag).Scan(&config) + return config + +} diff --git a/modules/dict/controller/admin/dict_info.go b/modules/dict/controller/admin/dict_info.go index 355cb9f23..593c30bef 100644 --- a/modules/dict/controller/admin/dict_info.go +++ b/modules/dict/controller/admin/dict_info.go @@ -19,7 +19,7 @@ func init() { &cool.Controller{ Prefix: "/admin/dict/info", Api: []string{"Add", "Delete", "Update", "Info", "List", "Page"}, - Service: service.NewDictInfoService(), + Service: service.DictInfoServiceS, }, } // 注册路由 @@ -34,7 +34,7 @@ type DictInfoDataReq struct { // Data 方法 获得字典数据 func (c *DictInfoController) Data(ctx context.Context, req *DictInfoDataReq) (res *cool.BaseRes, err error) { - service := service.NewDictInfoService() + service := service.DictInfoServiceS data, err := service.Data(ctx, req.Types) res = cool.Ok(data) return diff --git a/modules/dict/service/dict_info.go b/modules/dict/service/dict_info.go index ca38747d2..d623d4fb1 100644 --- a/modules/dict/service/dict_info.go +++ b/modules/dict/service/dict_info.go @@ -3,6 +3,7 @@ package service import ( "context" + "blazing/common/utils" "blazing/cool" "blazing/modules/dict/model" @@ -54,7 +55,7 @@ func (s *DictInfoService) Data(ctx context.Context, types []string) (data interf } return } -func (s *DictInfoService) DataOne(types string) (data []model.DictInfo) { +func (s *DictInfoService) DataRemark(types string) (data map[uint32]model.DictInfo) { var ( dictInfoModel = model.NewDictInfo() dictTypeModel = model.NewDictType() @@ -72,10 +73,42 @@ func (s *DictInfoService) DataOne(types string) (data []model.DictInfo) { m := cool.DBM(dictInfoModel) var ress []model.DictInfo m.Where("typeId", ty.ID).Scan(&ress) - return ress, nil + fusions := utils.ToMap(ress, func(t model.DictInfo) uint32 { + + return gconv.Uint32(t.Remark) //物品id转id + }) + return fusions, nil }, 0) - return ret.Interface().([]model.DictInfo) + return ret.Interface().(map[uint32]model.DictInfo) + +} +func (s *DictInfoService) DataID(types string) (data map[uint32]model.DictInfo) { + var ( + dictInfoModel = model.NewDictInfo() + dictTypeModel = model.NewDictType() + ) + ret, _ := cacheDict.GetOrSetFunc(context.Background(), types, func(context.Context) (interface{}, error) { + // 如果typeData为空, 则返回空 + var ty *model.DictType + mType := cool.DBM(dictTypeModel) + mType.Where("key in (?)", types).Scan(&ty) + + // 如果typeData为空, 则返回空 + if ty == nil { + return []model.DictInfo{}, nil + } + m := cool.DBM(dictInfoModel) + var ress []model.DictInfo + m.Where("typeId", ty.ID).Scan(&ress) + fusions := utils.ToMap(ress, func(t model.DictInfo) uint32 { + + return gconv.Uint32(t.ID) //物品id转id + }) + return fusions, nil + }, 0) + + return ret.Interface().(map[uint32]model.DictInfo) } @@ -122,6 +155,8 @@ func delChildDict(id int64) error { return err } +var DictInfoServiceS = NewDictInfoService() + // NewDictInfoService 初始化 DictInfoService func NewDictInfoService() *DictInfoService { return &DictInfoService{