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

服务端的更改 #25

Open
terryoy opened this issue Sep 23, 2017 · 2 comments
Open

服务端的更改 #25

terryoy opened this issue Sep 23, 2017 · 2 comments

Comments

@terryoy
Copy link
Contributor

terryoy commented Sep 23, 2017

目前有以下需要改动的API

  1. 缺少summary的API,今日,昨日,本月,上月总量。

  2. 按天返回的API和按时返回的API,设计需要优化(减少查询数据量和时间)。[已完成]

3. [优化] 对提交的读数进行校验,如果时间已存在则报错,插入按时间排序。(另建新任务)

  1. 增加一个按日取数据的接口,获取某日的详细读数。[已完成]

5. 过去24hours的数据,语意和实际数据不一致。[24hours是只取当天的,48hours是取今天和昨天的]

已知Bug:

  1. 提交读数的时候会创建新的node[已完成]

  2. datetime.date.fromtimstamp方法报错。 [已完成]

@terryoy
Copy link
Contributor Author

terryoy commented Sep 23, 2017

Bug#1 已修复,是文档url写错了的问题,同时给DeviceList加了个存在判断。
Bug#2 已修复。

@terryoy
Copy link
Contributor Author

terryoy commented Sep 23, 2017

目前服务器返回的power数据有simple和detail这两种。simple是每天只返回最后更新的读数,可以用作当天的读数;detail则是返回每天的所有详细读数(数据量会较大),一般只取一两天范围内的。

Latest Data用48hours的detail数据拼起来(以防止当天的数据不够显示)

Daily Power Usage可以用1month或2month的simple数据。

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

1 participant