```
feat(blazing): 更新怪物刷新规则模型结构 重构 monster_refresh.go 中的 MonsterRefresh 模型,调整字段定义以支持更灵活的刷新配置。 新增 MapID、MinLevel、MaxLevel、FixPos 和 Script 字段,用于支持地图和等级相关的刷新逻辑。 保留部分异色相关字段并标记为待定,便于后续决定是否移除。 新增 MonsterRefreshEX 结构体扩展 MonsterRefresh 并支持数组形式的 MonsterID 和 ShinyID。 修改注释内容以准确反映当前字段含义与用途。 同时修正 dict_info.go 中查询条件错误,将 type in (?) 更正
This commit is contained in:
@@ -15,6 +15,13 @@ type DictInfoService struct {
|
||||
*cool.Service
|
||||
}
|
||||
|
||||
// func init() {
|
||||
|
||||
// t, _ := NewDictInfoService().Data(context.TODO(), []string{"mapid"})
|
||||
// fmt.Println(t)
|
||||
|
||||
// }
|
||||
|
||||
// Data方法, 用于获取数据
|
||||
func (s *DictInfoService) Data(ctx context.Context, types []string) (data interface{}, err error) {
|
||||
var (
|
||||
@@ -24,7 +31,7 @@ func (s *DictInfoService) Data(ctx context.Context, types []string) (data interf
|
||||
mType := cool.DBM(dictTypeModel)
|
||||
// 如果types不为空, 则查询指定类型的数据
|
||||
if len(types) > 0 {
|
||||
mType = mType.Where("type in (?)", types)
|
||||
mType = mType.Where("key in (?)", types)
|
||||
}
|
||||
// 查询所有类型
|
||||
typeData, err := mType.All()
|
||||
|
||||
Reference in New Issue
Block a user