diff --git a/modules/config/model/map_pit.go b/modules/config/model/map_pit.go index cab7c694b..22c951e64 100644 --- a/modules/config/model/map_pit.go +++ b/modules/config/model/map_pit.go @@ -24,7 +24,7 @@ type MapPit struct { *BaseConfig *Event // 复用通用基础配置(ID/创建时间/更新时间等) - MapID []int32 `gorm:"type:int[];comment:'绑定地图地图ID'" json:"map_id"` + MapID int32 `gorm:"not null;index;comment:'所属地图ID'" json:"map_id" description:"地图ID"` RefreshID []int `gorm:"type:int[];comment:'精灵ID列表'" json:"refresh_id"` Pos []int `gorm:"type:int[];comment:'坑位位置'" json:"pos"` diff --git a/modules/config/service/map_pit.go b/modules/config/service/map_pit.go index 2cb320f9f..bc2b4a2d8 100644 --- a/modules/config/service/map_pit.go +++ b/modules/config/service/map_pit.go @@ -15,6 +15,7 @@ func NewMapPitService() *MapPitService { Model: model.NewMapPit(), PageQueryOp: &cool.QueryOp{ KeyWordField: []string{"remake"}, + FieldEQ: []string{"map_id"}, }, }, }