[账单]显示账单、手动生成账单

This commit is contained in:
GoEdgeLab
2020-12-11 21:39:10 +08:00
parent d2f72d7e87
commit 641df4ccc5
13 changed files with 429 additions and 14 deletions

View File

@@ -3,6 +3,8 @@ package models
import (
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
_ "github.com/go-sql-driver/mysql"
"github.com/iwind/TeaGo/dbs"
timeutil "github.com/iwind/TeaGo/utils/time"
"testing"
)
@@ -37,3 +39,12 @@ func TestServerDailyStatDAO_SaveStats2(t *testing.T) {
}
t.Log("ok")
}
func TestServerDailyStatDAO_SumUserMonthly(t *testing.T) {
dbs.NotifyReady()
bytes, err := NewServerDailyStatDAO().SumUserMonthly(1, 1, timeutil.Format("Ym"))
if err != nil {
t.Fatal(err)
}
t.Log("bytes:", bytes)
}