linkEventLogic_test.go 613 B

12345678910111213141516171819202122232425262728293031
  1. package test
  2. import (
  3. "fmt"
  4. "git.rtzhtech.cn/iss/public-lib/dto"
  5. "git.rtzhtech.cn/iss/public-lib/logic"
  6. "testing"
  7. )
  8. func newLinkEventReq() *dto.GetLinkEventReq {
  9. req := &dto.GetLinkEventReq{}
  10. req.Page = 1
  11. req.Limit = 3
  12. //req.SrcAppId = []int32{1, 123}
  13. req.StartTime = "2022-08-01 00:01:01"
  14. req.EndTime = "2022-08-01 23:59:59"
  15. return req
  16. }
  17. func TestGetLinkEvent(t *testing.T) {
  18. l := logic.NewLinkEventLogic()
  19. out, err := l.GetLinkEvent(newLinkEventReq())
  20. if err != nil {
  21. t.Errorf("TestPage:%v\n", err)
  22. }
  23. fmt.Printf("total:%d\n", out.Total)
  24. for _, v := range out.List {
  25. fmt.Println(v)
  26. }
  27. }