diff --git a/release/backend b/release/backend index 3346a79..a268da1 100644 Binary files a/release/backend and b/release/backend differ diff --git a/util/statistics.go b/util/statistics.go index c89b1ae..f04c46a 100644 --- a/util/statistics.go +++ b/util/statistics.go @@ -251,7 +251,7 @@ func GetOperation(App *Type.App) (*Type.Operation, error) { } InactiveTime, _ := GetZeroTimestamp(App.Tz, -8) var InactiveUsers int - err = Db.Get(&InactiveUsers, "SELECT count(distinct Uid) as count from (SELECT Uid, MAX(Timestamp) as LastLogin FROM log_login WHERE Event = 'Login_log' GROUP BY Uid) as lt where lastlogin < ?", InactiveTime) + err = Db.Get(&InactiveUsers, "SELECT count(distinct Uid) as count from (SELECT Uid, MAX(Timestamp) as LastLogin FROM log_login WHERE Event = 'Login_log' GROUP BY Uid) as lt where lastlogin < ? and lastlogin > ?", InactiveTime, App.OpenTime) if err != nil { return nil, fmt.Errorf("failed to select data: %v", err) }