WAF统计图表中把page归为拦截,把tag归为记录

This commit is contained in:
GoEdgeLab
2022-03-17 16:49:46 +08:00
parent 4330559415
commit 151f0d4546
3 changed files with 11 additions and 8 deletions

View File

@@ -109,10 +109,13 @@ func (this *ServerHTTPFirewallDailyStatDAO) GroupDailyCount(tx *dbs.Tx, userId i
}
// FindDailyStats 查询某个日期段内的记录
func (this *ServerHTTPFirewallDailyStatDAO) FindDailyStats(tx *dbs.Tx, userId int64, serverId int64, action string, dayFrom string, dayTo string) (result []*ServerHTTPFirewallDailyStat, err error) {
func (this *ServerHTTPFirewallDailyStatDAO) FindDailyStats(tx *dbs.Tx, userId int64, serverId int64, actions []string, dayFrom string, dayTo string) (result []*ServerHTTPFirewallDailyStat, err error) {
if len(actions) == 0 {
return nil, nil
}
query := this.Query(tx).
Between("day", dayFrom, dayTo).
Attr("action", action)
Attr("action", actions)
if serverId > 0 {
query.Attr("serverId", serverId)
} else if userId > 0 {