上传后台修改
This commit is contained in:
@@ -89,7 +89,7 @@ class LocationService(DatabaseServiceBase):
|
||||
db_session = await self.get_session()
|
||||
try:
|
||||
dao = LocationDAO(db_session)
|
||||
current_row = await dao.get_device_current_location(device_id=device_id)
|
||||
current_row = await dao.get_device_current_location_by_device_id(device_id=device_id)
|
||||
if current_row:
|
||||
await dao.update(device_id=device_id, latitude=location.lat, longitude=location.lng)
|
||||
# 更新成功加到历史记录表
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
import asyncio
|
||||
from dataclasses import dataclass
|
||||
from datetime import UTC, datetime
|
||||
from datetime import datetime
|
||||
try:
|
||||
from datetime import UTC # Python 3.11+
|
||||
except ImportError:
|
||||
from datetime import timezone
|
||||
UTC = timezone.utc # Python 3.10 及更早版本
|
||||
|
||||
from urllib.parse import urlparse
|
||||
from uuid import uuid4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user