Files
cattleTransportation/tradeCattle/clear_and_resync_xq_client_log.sql

28 lines
554 B
MySQL
Raw Normal View History

2025-10-24 17:32:42 +08:00
-- 清空xq_client_log表并重新同步数据
-- 解决字段映射问题
-- 1. 清空现有数据
TRUNCATE TABLE xq_client_log;
-- 2. 检查表是否为空
SELECT COUNT(*) as record_count FROM xq_client_log;
-- 3. 显示表结构
DESCRIBE xq_client_log;
-- 4. 检查iot_device_data表中的项圈设备数据
SELECT
device_id,
device_type,
voltage,
temperature,
steps,
same_day_steps,
latitude,
longitude,
update_time
FROM iot_device_data
WHERE device_type = 4
AND delivery_id = 86
ORDER BY update_time DESC;