This commit is contained in:
richboo111
2023-01-12 18:12:48 +08:00
parent 91919f25c4
commit 5610ddb767
6 changed files with 51 additions and 47 deletions

View File

@@ -10,11 +10,11 @@ import (
)
func TestCreateSubProduct(t *testing.T) {
params := `[1,2]`
var obj []int
err := Strings2Objs(params, &obj)
fmt.Println(err)
fmt.Println(obj)
//params := `[1,2]`
//var obj []int
//err := Strings2Objs(params, &obj)
//fmt.Println(err)
//fmt.Println(obj)
}
// 删除已经创建商品,重新同步

View File

@@ -371,8 +371,6 @@ func (a *API) CreateWarehouse(param *warehouse_create_request.WarehouseCreatePar
response, err := request.Execute(a.accessTokenObj)
globals.SugarLogger.Debugf("创建单个区域仓=========:%s", request.GetUrlPath())
globals.SugarLogger.Debugf("创建单个区域仓:=%s", utils.Format4Output(response, false))
globals.SugarLogger.Debugf("创建单个区域仓param=%v", request.GetParams())
globals.SugarLogger.Debugf("创建单个区域仓param=%v", request.Param.Warehouse.AddressDetail)
if err != nil {
return nil, err
}

View File

@@ -2,7 +2,6 @@ package tiktok_api
import (
"fmt"
"reflect"
"testing"
)
@@ -23,25 +22,15 @@ type tete struct {
}
func Test(t *testing.T) {
//var a []int64
var b interface{}
//stType := reflect.TypeOf(a)
//stValue := reflect.ValueOf(a)
x := reflect.TypeOf(b)
fmt.Println(reflect.TypeOf(a) == reflect.TypeOf([]int64{}))
switch x {
case reflect.TypeOf([]int64{}):
fmt.Println(1)
case reflect.TypeOf([]string{}):
fmt.Println(2)
}
//fmt.Println(stType.NumField())
//fmt.Println(stType.Field(0))
//temp := stType.Field(0)
//fmt.Println(temp.Type)
//Strings2Objs(`[1262627,1723872383]`, &a)
//fmt.Printf("%v", reflect.TypeOf(a).NumField())
//var b interface{}
//x := reflect.TypeOf(b)
//fmt.Println(reflect.TypeOf(a) == reflect.TypeOf([]int64{}))
//switch x {
//case reflect.TypeOf([]int64{}):
// fmt.Println(1)
//case reflect.TypeOf([]string{}):
// fmt.Println(2)
//}
fmt.Println(50&2, 3&2)
fmt.Println(50|2, 3|2)
}