Files
youlai-boot/sql/sys_sn_location_fix_map_error.sql
TongTongStudio 9d6498872f feat(device): 新增设备定位查询接口并修复定位数据存储问题
- 新增 GET /{sn}/location 接口,支持网页端查询设备最新定位信息
- 新增 DeviceLocationVO 视图对象用于返回定位数据
- 在 LocationService 中实现 getLatestBySn 方法
- 修复 map_error 字段类型错误:从 INT 改为 VARCHAR(255)
- 修复移动端上报定位时 lastSuccessfulTime 缺失问题,由服务端统一写入
2026-08-05 23:15:34 +08:00

10 lines
509 B
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 修复 sys_sn_location.map_error 列类型
-- 问题:代码中 map_error 为 String存 '-' 表示成功,或真实错误信息),
-- 但数据库列当前为 INT导致写入 '-' 时报错:
-- "Incorrect integer value: '-' for column 'map_error'"
-- 解决:将 map_error 改为 VARCHAR使其可同时保存成功标记与失败原因。
ALTER TABLE sys_sn_location
MODIFY COLUMN map_error VARCHAR(255) NULL DEFAULT NULL
COMMENT '定位失败原因,成功时为 -';