消息接收人可以设置接收消息时间段

This commit is contained in:
GoEdgeLab
2021-08-24 17:46:11 +08:00
parent 8c1771331f
commit bb00f6d441
5 changed files with 55 additions and 5 deletions

View File

@@ -3,4 +3,20 @@ package models
import (
_ "github.com/go-sql-driver/mysql"
_ "github.com/iwind/TeaGo/bootstrap"
"github.com/iwind/TeaGo/dbs"
"testing"
)
func TestMessageTaskDAO_FindSendingMessageTasks(t *testing.T) {
dbs.NotifyReady()
var tx *dbs.Tx
tasks, err := NewMessageTaskDAO().FindSendingMessageTasks(tx, 100)
if err != nil {
t.Fatal(err)
}
t.Log(len(tasks), "tasks")
for _, task := range tasks {
t.Log("task:", task.Id, "recipient:", task.RecipientId)
}
}