```
feat(pet): 实现精灵融合功能并优化相关数据结构 - 新增精灵融合主服务和材料服务,支持根据主副精灵ID查询融合结果 - 调整融合接口参数结构,将物品字段统一为数组形式 - 修改融合材料模型字段类型,提升数据一致性 - 重构融合配置相关逻辑,移除旧融合配置模型及服务 - 增加特性随机选择逻辑,确保融合产物具备有效特性 - 添加材料合法性校验,防止非法材料参与融合 ```
This commit is contained in:
@@ -53,6 +53,26 @@ func (s *DictInfoService) Data(ctx context.Context, types []string) (data interf
|
||||
}
|
||||
return
|
||||
}
|
||||
func (s *DictInfoService) DataOne(types string) (data []model.DictInfo, err error) {
|
||||
var (
|
||||
dictInfoModel = model.NewDictInfo()
|
||||
dictTypeModel = model.NewDictType()
|
||||
)
|
||||
// 如果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)
|
||||
|
||||
return ress, nil
|
||||
}
|
||||
|
||||
// ModifyAfter 修改后
|
||||
func (s *DictInfoService) ModifyAfter(ctx context.Context, method string, param map[string]interface{}) (err error) {
|
||||
|
||||
Reference in New Issue
Block a user