服务数据接口小变动
This commit is contained in:
parent
965e55119d
commit
118b224748
|
@ -26,6 +26,8 @@ export class OpenDataController {
|
|||
if (!limitSize){
|
||||
if (Number(type)){
|
||||
limitSize=10
|
||||
}else {
|
||||
limitSize=24
|
||||
}
|
||||
}
|
||||
return this.openDataService.userData(areaCode,type,limitSize);
|
||||
|
|
|
@ -296,7 +296,7 @@ class OpenDataMapper {
|
|||
let sql
|
||||
switch (type) {
|
||||
case 0:
|
||||
sql='SELECT a.stat_time AS time,a.`value`,c.address_code as addressCode from szja_live_stat_hour a LEFT JOIN szja_user_home b ON b.user_id=a.user_id LEFT JOIN szja_hcc_info c ON c.id=b.hcc_id WHERE TIMESTAMPDIFF(HOUR,a.create_time,now()) <= 24'
|
||||
sql='SELECT a.stat_time AS time,a.`value`,c.address_code as addressCode from szja_live_stat_hour a LEFT JOIN szja_user_home b ON b.user_id=a.user_id LEFT JOIN szja_hcc_info c ON c.id=b.hcc_id WHERE TIMESTAMPDIFF(HOUR,a.create_time,now()) <= ?'
|
||||
break
|
||||
case 1:
|
||||
sql='SELECT a.stat_time AS time,a.`value`,c.address_code as addressCode from szja_live_stat_day a LEFT JOIN szja_user_home b ON b.user_id=a.user_id LEFT JOIN szja_hcc_info c ON c.id=b.hcc_id WHERE TIMESTAMPDIFF(DAY,a.create_time,now()) <= ?'
|
||||
|
|
Loading…
Reference in New Issue
Block a user