This commit is contained in:
邹宗楠
2022-11-04 18:19:15 +08:00
parent 8cf9a15dce
commit 4b373ac901
2 changed files with 19 additions and 6 deletions

View File

@@ -22,7 +22,7 @@ func TestApi(t *testing.T) {
} }
func TestQueryOrderDetail(t *testing.T) { func TestQueryOrderDetail(t *testing.T) {
data, err := a.GetTiktokOrderDetail("4996263656479857894") data, err := a.GetTiktokOrderDetail("4996895368866964710")
globals.SugarLogger.Debugf("=====%s", utils.Format4Output(data, false)) globals.SugarLogger.Debugf("=====%s", utils.Format4Output(data, false))
globals.SugarLogger.Debugf("=====%s", err) globals.SugarLogger.Debugf("=====%s", err)
} }
@@ -112,8 +112,13 @@ func TestOrderStatusAndPsInfo(t *testing.T) {
} }
func TestMap(t *testing.T) { func TestMap(t *testing.T) {
data := map[string]string{"1": "1", "2": "2"} //fmt.Println(time.Duration(600) * 1000 * 1000 * 100)
fmt.Println(data) fmt.Println(time.Duration(600) * time.Second)
delete(data, "1")
fmt.Println(data) aa := time.Now().Add(time.Duration(570) * time.Second)
fmt.Println(aa)
//for i := 0; i < 20; i++ {
// randNumber, _ := rand.Int(rand.Reader, big.NewInt(640))
// fmt.Println(randNumber)
//}
} }

View File

@@ -13,6 +13,7 @@ import (
"git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals"
"go.uber.org/zap" "go.uber.org/zap"
"math/rand"
"strings" "strings"
"testing" "testing"
"time" "time"
@@ -336,5 +337,12 @@ func TestGetBrandId(t *testing.T) {
} }
func Test11111(t *testing.T) { func Test11111(t *testing.T) {
fmt.Println(time.Now().Add(-10 * time.Minute).After(time.Now())) rand.Seed(time.Now().UnixNano())
for i := 0; i < 10; i++ {
randNumber := rand.Int63n(481)
if randNumber < 60 {
randNumber += 60
}
fmt.Println(randNumber)
}
} }