feat(server): 添加服务器地理位置信息字段
Build docker and publish / build (20.15.1) (push) Successful in 7m3s

为服务器模型添加经度、纬度及中心点坐标字段,并在相关逻辑中处理这些字段
同时修复服务器用户列表缓存功能
This commit is contained in:
2025-11-03 23:50:23 -08:00
parent 071bb1940d
commit 15f4e69dc3
12 changed files with 2689 additions and 58 deletions
@@ -99,6 +99,10 @@ func (l *CreateServerLogic) CreateServer(req *types.CreateServerRequest) error {
} else {
data.City = result.City
data.Country = result.Country
data.Latitude = result.Latitude
data.Longitude = result.Longitude
data.LatitudeCenter = result.LatitudeCenter
data.LongitudeCenter = result.LongitudeCenter
}
}
err = l.svcCtx.NodeModel.InsertServer(l.ctx, &data)
@@ -47,6 +47,10 @@ func (l *UpdateServerLogic) UpdateServer(req *types.UpdateServerRequest) error {
} else {
data.City = result.City
data.Country = result.Country
data.Latitude = result.Latitude
data.Longitude = result.Longitude
data.LatitudeCenter = result.LatitudeCenter
data.LongitudeCenter = result.LongitudeCenter
}
// update address
data.Address = req.Address