screen
Former-commit-id: 60c449340e91830d4c3676ac173eb47880938768
This commit is contained in:
parent
6f1edf393e
commit
841e6c36f2
|
@ -25,6 +25,9 @@ func NewGetScreenChartLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Ge
|
||||||
|
|
||||||
func (l *GetScreenChartLogic) GetScreenChart() (resp *types.ScreenChartResp, err error) {
|
func (l *GetScreenChartLogic) GetScreenChart() (resp *types.ScreenChartResp, err error) {
|
||||||
resp = &types.ScreenChartResp{}
|
resp = &types.ScreenChartResp{}
|
||||||
l.svcCtx.DbEngin.Raw("select * from screen_chart").Scan(&resp)
|
l.svcCtx.DbEngin.Raw("select cpu_avg from screen_chart").Scan(&resp.CpuAvg)
|
||||||
|
l.svcCtx.DbEngin.Raw("select cpu_load from screen_chart").Scan(&resp.CpuLoad)
|
||||||
|
l.svcCtx.DbEngin.Raw("select memory_avg from screen_chart").Scan(&resp.MemoryAvg)
|
||||||
|
l.svcCtx.DbEngin.Raw("select memory_load from screen_chart").Scan(&resp.MemoryLoad)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue