为服务器模型添加经度、纬度及中心点坐标字段,并在相关逻辑中处理这些字段 同时修复服务器用户列表缓存功能
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user