rts-sim-testing-service/service/simulation.go
2023-08-30 18:05:11 +08:00

19 lines
531 B
Go

package service
import (
"google.golang.org/protobuf/proto"
"joylink.club/bj-rtsts-server/ats/verify/protos/graphicData"
"joylink.club/bj-rtsts-server/dto"
)
// 查询地图数据
func QueryRtssGraphicStorage(mapId int32) *graphicData.RtssGraphicStorage {
publishdata, err := GetPublishedGiById(int(mapId))
if err != nil {
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
}
graphicStorage := &graphicData.RtssGraphicStorage{}
proto.Unmarshal(publishdata.Proto, graphicStorage)
return graphicStorage
}