-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
microrain
authored and
microrain
committed
Feb 27, 2024
1 parent
0477fa5
commit dc697cc
Showing
1,090 changed files
with
30,613 additions
and
26,889 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package analysis | ||
|
||
import ( | ||
"github.com/gogf/gf/v2/frame/g" | ||
"sagooiot/internal/model" | ||
) | ||
|
||
// DeviceAlertCountByYearMonthReq 按年度每月设备告警数统计 | ||
type DeviceAlertCountByYearMonthReq struct { | ||
g.Meta `path:"/deviceAlertCountByYearMonth" method:"get" summary:"按年度每月设备告警数统计" tags:"IOT数据分析"` | ||
Year string `json:"year" v:"required#日期不能为空" dc:"日期:年-yyyy"` | ||
} | ||
type DeviceAlertCountByYearMonthRes struct { | ||
Data []model.CountData `json:"data" dc:"月设备告警计数"` | ||
} | ||
|
||
// DeviceAlertCountByMonthDayReq 按月度每日设备告警数统计 | ||
type DeviceAlertCountByMonthDayReq struct { | ||
g.Meta `path:"/deviceAlertCountByMonthDay" method:"get" summary:"按月度每日设备告警数统计" tags:"IOT数据分析"` | ||
Month string `json:"month" v:"required#日期不能为空" dc:"日期:年-月 yyyy-MM"` | ||
} | ||
type DeviceAlertCountByMonthDayRes struct { | ||
Data []model.CountData `json:"data" dc:"日设备告警计数"` | ||
} | ||
|
||
// DeviceAlertCountByDayHourReq 按日每小时设备告警数统计 | ||
type DeviceAlertCountByDayHourReq struct { | ||
g.Meta `path:"/deviceAlertCountsByDayHour" method:"get" summary:"按日每小时设备告警数统计" tags:"IOT数据分析"` | ||
Day string `json:"day" v:"required#日期不能为空" dc:"日期:年-月-日 yyyy-MM-dd"` | ||
} | ||
type DeviceAlertCountByDayHourRes struct { | ||
Data []model.CountData `json:"data" dc:"小时设备告警计数"` | ||
} | ||
|
||
// DeviceAlarmTotalCountReq 指定时间的告警总数统计,按年,月,日分别指定 | ||
type DeviceAlarmTotalCountReq struct { | ||
g.Meta `path:"/deviceAlarmTotalCount" method:"get" summary:"告警总数统计(当年、当月、当日)" tags:"IOT数据分析"` | ||
DateType string `json:"dateType" v:"required#日期类型不能为空" dc:"日期类型:year 年,month 月,day 日"` | ||
Date string `json:"date" v:"required#日期不能为空" dc:"日期:年 yyyy,月 yyyy-MM,日 yyyy-MM-dd"` | ||
} | ||
type DeviceAlarmTotalCountRes struct { | ||
Number int64 `json:"number" dc:"告警总数"` | ||
} | ||
|
||
// DeviceAlarmLevelCountReq 告警级别统计 | ||
type DeviceAlarmLevelCountReq struct { | ||
g.Meta `path:"/deviceAlarmLevelCount" method:"get" summary:"告警按级别统计" tags:"IOT数据分析"` | ||
DateType string `json:"dateType" v:"required#日期类型不能为空" dc:"日期类型:year 年,month 月,day 日"` | ||
Date string `json:"date" v:"required#日期不能为空" dc:"日期:年 yyyy,月 MM,日 dd"` | ||
} | ||
type DeviceAlarmLevelCountRes struct { | ||
Data []model.CountData `json:"data" dc:"告警级别统计"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package analysis | ||
|
||
import ( | ||
"github.com/gogf/gf/v2/frame/g" | ||
"sagooiot/internal/model" | ||
) | ||
|
||
// DeviceDataTotalCountReq 设备消息总数统计(当年、当月、当日) | ||
type DeviceDataTotalCountReq struct { | ||
g.Meta `path:"/deviceDataTotalCount" method:"get" summary:"设备消息总数统计(当年、当月、当日)" tags:"IOT数据分析"` | ||
DateType string `json:"dateType" v:"required#日期类型不能为空" dc:"日期类型:year 年,month 月,day 日"` | ||
} | ||
type DeviceDataTotalCountRes struct { | ||
Number int64 `json:"number" dc:"消息总数"` | ||
} | ||
|
||
// DeviceOnlineOfflineCountReq 设备在线离线统计 | ||
type DeviceOnlineOfflineCountReq struct { | ||
g.Meta `path:"/deviceOnlineOfflineCount" method:"get" summary:"设备在线离线统计" tags:"IOT数据分析"` | ||
} | ||
type DeviceOnlineOfflineCountRes struct { | ||
Data model.DeviceOnlineOfflineCount | ||
} | ||
|
||
// DeviceDataCountReq 按年度每月设备消息统计 | ||
type DeviceDataCountReq struct { | ||
g.Meta `path:"/deviceDataCount" method:"get" summary:"按年度统计1-12月份设备消息统计" tags:"IOT数据分析"` | ||
DateType string `json:"dateType" v:"required#日期类型不能为空" dc:"日期类型:year 年,month 月,day 日"` | ||
//Date string `json:"date" v:"" dc:"日期:年-yyyy"` | ||
} | ||
type DeviceDataCountRes struct { | ||
Data []model.CountData `json:"data" dc:"1-12月份设备消息量统计数据"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package analysis | ||
|
||
import ( | ||
"github.com/gogf/gf/v2/frame/g" | ||
"sagooiot/api/v1/common" | ||
"sagooiot/internal/model" | ||
) | ||
|
||
// DeviceDataReq 按年度每月设备消息统计 | ||
type DeviceDataReq struct { | ||
g.Meta `path:"/deviceData" method:"get" summary:"设备最近的数据" tags:"IOT数据分析"` | ||
DeviceKey string `json:"deviceKey" v:"required#设备key不能为空" dc:"设备key"` | ||
common.PaginationReq | ||
} | ||
type DeviceDataRes struct { | ||
Data []interface{} | ||
common.PaginationRes | ||
} | ||
|
||
// DeviceDataForProductByLatestReq 按产品查询设备最近的数据 | ||
type DeviceDataForProductByLatestReq struct { | ||
g.Meta `path:"/deviceDataForProductByLatest" method:"get" summary:"按产品查询设备最近的数据" tags:"IOT数据分析"` | ||
ProductKey string `json:"productKey" v:"required#产品key不能为空" dc:"产品key"` | ||
} | ||
|
||
type DeviceDataForProductByLatestRes struct { | ||
Data []model.DeviceDataRes | ||
} | ||
|
||
type DeviceDataForTsdReq struct { | ||
g.Meta `path:"/deviceDataForTsd" method:"get" summary:"设备的时序数据" tags:"IOT数据分析"` | ||
common.PaginationReq | ||
} | ||
type DeviceDataForTsdRes struct { | ||
Data []interface{} | ||
common.PaginationRes | ||
} | ||
|
||
// DeviceAlarmLogDataReq 设备告警日志数据请求 | ||
type DeviceAlarmLogDataReq struct { | ||
g.Meta `path:"/deviceAlarmLogData" method:"get" summary:"设备告警日志数据" tags:"IOT数据分析"` | ||
common.PaginationReq | ||
} | ||
type DeviceAlarmLogDataRes struct { | ||
Data interface{} | ||
common.PaginationRes | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package analysis | ||
|
||
import ( | ||
"github.com/gogf/gf/v2/frame/g" | ||
) | ||
|
||
// ProductCountReq 按年度每月设备消息统计 | ||
type ProductCountReq struct { | ||
g.Meta `path:"/productCount" method:"get" summary:"产品数量统计" tags:"IOT数据分析"` | ||
} | ||
type ProductCountRes struct { | ||
Total int `json:"total" dc:"产品总数"` | ||
Enable int `json:"enable" dc:"启用产品数"` | ||
Disable int `json:"disable" dc:"禁用产品数"` | ||
Added int `json:"added" dc:"新增产品数"` | ||
} | ||
|
||
// DeviceCountForProductReq 获取属于该产品下的设备数量 | ||
type DeviceCountForProductReq struct { | ||
g.Meta `path:"/deviceCountForProduct" method:"get" summary:"获取属于该产品下的设备数量" tags:"IOT数据分析"` | ||
ProductKey string `json:"productKey" v:"required#ProductKey,产品key不能为空" dc:"产品key"` | ||
} | ||
type DeviceCountForProductRes struct { | ||
Number int `json:"number" dc:"设备数"` | ||
} |
Oops, something went wrong.