This commit is contained in:
richboo111
2022-11-07 11:03:11 +08:00
4 changed files with 23 additions and 9 deletions

View File

@@ -22,7 +22,7 @@ func TestApi(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", err)
}
@@ -112,8 +112,13 @@ func TestOrderStatusAndPsInfo(t *testing.T) {
}
func TestMap(t *testing.T) {
data := map[string]string{"1": "1", "2": "2"}
fmt.Println(data)
delete(data, "1")
fmt.Println(data)
//fmt.Println(time.Duration(600) * 1000 * 1000 * 100)
fmt.Println(time.Duration(600) * time.Second)
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

@@ -119,6 +119,7 @@ func (a *API) CreateStoreCommodity(skuParam *product_addV2_request.ProductAddV2P
result, err := request.Execute(a.accessTokenObj)
globals.SugarLogger.Debugf("新增商品=========:%s", request.GetUrlPath())
globals.SugarLogger.Debugf("新增商品:=%s", utils.Format4Output(result, false))
globals.SugarLogger.Debugf("参数详情:=%s", utils.Format4Output(skuParam, false))
if err != nil {
return nil, err
}

View File

@@ -13,6 +13,7 @@ import (
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals"
"go.uber.org/zap"
"math/rand"
"strings"
"testing"
"time"
@@ -336,5 +337,12 @@ func TestGetBrandId(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)
}
}