Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

数据库的地区格式不统一影响吗 #661

Closed
gavenwan opened this issue Apr 17, 2024 · 2 comments
Closed

数据库的地区格式不统一影响吗 #661

gavenwan opened this issue Apr 17, 2024 · 2 comments

Comments

@gavenwan
Copy link
Contributor

我因为有部分数据是gpx,部分是keep
解析完成后,看db数据库里

gpx解析后的location_country 字段是纯文本,例如
莫平山镇, 德清县, 湖州市, 浙江省, 中国

keep解析后的location_country字段是对象json,例如
{'latitude': 40.083184, 'longitude': 113.373578, 'country': '中国', 'nationCode': '156', 'province': '山西省', 'city': '大同市', 'cityCode': '0352', 'district': None, 'districtCode': None}

这个会影响最后前台页面的显示吗?是不是gpx_sync的location_country解析后数据格式与keep解析后的格式统一比较好?

@SongJgit
Copy link
Contributor

SongJgit commented Apr 18, 2024

这个完全没有必要担心,写入数据库的时候是统一的。
大部分的流程都是:
数据(无论来自哪里) -> data.db -> activities.json -> display

@yihong0618
Copy link
Owner

这个完全没有必要担心,写入数据库的时候是统一的。 大部分的流程都是: 数据(无论来自哪里) -> data.db -> activities.json -> display

谢谢,是的有一步是利用 GPX 强行统一
但现在有一点不好,那个接口被墙了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants