2023-07-31 15:44:08 +08:00
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
|
|
|
"google.golang.org/protobuf/proto"
|
|
|
|
"joylink.club/bj-rtsts-server/ats/verify/protos/graphicData"
|
2023-08-30 18:05:11 +08:00
|
|
|
"joylink.club/bj-rtsts-server/dto"
|
2023-07-31 15:44:08 +08:00
|
|
|
)
|
|
|
|
|
2023-07-31 17:27:05 +08:00
|
|
|
// 查询地图数据
|
2023-07-31 15:44:08 +08:00
|
|
|
func QueryRtssGraphicStorage(mapId int32) *graphicData.RtssGraphicStorage {
|
|
|
|
publishdata, err := GetPublishedGiById(int(mapId))
|
|
|
|
if err != nil {
|
2023-08-30 18:05:11 +08:00
|
|
|
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
2023-07-31 15:44:08 +08:00
|
|
|
}
|
|
|
|
graphicStorage := &graphicData.RtssGraphicStorage{}
|
|
|
|
proto.Unmarshal(publishdata.Proto, graphicStorage)
|
|
|
|
return graphicStorage
|
|
|
|
}
|