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

@@ -94,9 +94,9 @@ type ColumnsItem struct {
// 满xx件包邮 1-10之间的整数 // 满xx件包邮 1-10之间的整数
OverNum int64 `json:"over_num"` OverNum int64 `json:"over_num"`
// 最小金额限制,单位分,不限制填-1 // 最小金额限制,单位分,不限制填-1
MinSkuAmount int64 `json:"min_sku_amount"` //MinSkuAmount int64 `json:"min_sku_amount"`
// 最大金额限制,单位分,不限制填-1 //// 最大金额限制,单位分,不限制填-1
MaxSkuAmount int64 `json:"max_sku_amount"` //MaxSkuAmount int64 `json:"max_sku_amount"`
// 当前规则生效的地址统一以List<Struct>结构返回该结构为嵌套结构。对应的json格式为[{"id":"32","children":[{"id":"320500","children":[{"id":"320508","children":[{"id":"320508014"},{"id":"320508004"}]}]}]}] 注意:返回的为最新的四级地址版本(地址存储升级变更的可能,以最新的返回) // 当前规则生效的地址统一以List<Struct>结构返回该结构为嵌套结构。对应的json格式为[{"id":"32","children":[{"id":"320500","children":[{"id":"320508","children":[{"id":"320508014"},{"id":"320508004"}]}]}]}] 注意:返回的为最新的四级地址版本(地址存储升级变更的可能,以最新的返回)
ProvinceInfos []ProvinceInfosItem `json:"province_infos"` ProvinceInfos []ProvinceInfosItem `json:"province_infos"`
} }

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

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

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)
}
} }