You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
323 B
19 lines
323 B
|
1 year ago
|
package models
|
||
|
|
|
||
|
|
import (
|
||
|
|
"github.com/liangdas/mqant/log"
|
||
|
|
"server/common"
|
||
|
|
"server/db"
|
||
|
|
)
|
||
|
|
|
||
|
|
func GetDailyData(s, e *int64, channel *int, field string) int64 {
|
||
|
|
q := NewQ(s, e, nil, channel)
|
||
|
|
|
||
|
|
res, err := db.ES().SumBy(common.ESIndexBackDailyData, field, q)
|
||
|
|
if err != nil {
|
||
|
|
log.Error(err.Error())
|
||
|
|
}
|
||
|
|
|
||
|
|
return int64(res)
|
||
|
|
}
|