【解决报错】
This commit is contained in:
parent
d102404b6b
commit
33cceef0c8
@ -35,7 +35,7 @@ func InitSimulationRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddle
|
||||
}
|
||||
|
||||
func initPublishMapInfo() {
|
||||
mapArr, err := service.ListQueryPublishedGi(&dto.PublishedGiReqDto{})
|
||||
mapArr, err := service.ListAllPublishedGi()
|
||||
if err != nil {
|
||||
panic("地图加载出错")
|
||||
}
|
||||
|
@ -39,6 +39,10 @@ func ListQueryPublishedGi(req *publishedGi.PublishedGiReqDto) []*publishedGi.Pub
|
||||
return publishedGi.ConvertFromSlice(find)
|
||||
}
|
||||
|
||||
func ListAllPublishedGi() ([]*model.PublishedGi, error) {
|
||||
return dbquery.PublishedGi.Debug().Find()
|
||||
}
|
||||
|
||||
func GetPublishedGiById(id int) (*model.PublishedGi, error) {
|
||||
return dbquery.PublishedGi.Where(dbquery.PublishedGi.ID.Eq(int32(id))).Debug().First()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user