This commit is contained in:
richboo111
2023-03-07 16:25:26 +08:00
9 changed files with 184 additions and 123 deletions

View File

@@ -169,15 +169,16 @@ var c = []int64{
//668708,
//668713,
//668707,
//668712,
//668710,
//668714,
//668723,
//668790,
//668789,
//668785,
//668512,
//667481,
//668712,running
//668710,running
//668714,running
//668723, ok
//668790, no
//668789, no
//668785, no
//668512, running
//667481, running
// 删除已经创建商品,重新同步
func TestDeleteSkuAndUploadSku(t *testing.T) {
@@ -217,10 +218,11 @@ func TestDeleteSkuAndUploadSkuFengJinBiXu222(t *testing.T) {
var errList = make([]error, 0, 0)
for i := 1; i < 100; i++ {
result, err := a.GetSkuDetailList(&product_listV2_request.ProductListV2Param{
//Status: 2,
//CheckStatus: 3, // 1-未提交2-待审核3-审核通过4-审核未通过5-封禁7-审核通过待上架
Page: int64(i),
Size: 100,
Status: 0,
CheckStatus: 3, // 1-未提交2-待审核3-审核通过4-审核未通过5-封禁7-审核通过待上架
Page: int64(i),
Size: 100,
StoreId: 69395217,
})
if err != nil {
globals.SugarLogger.Debugf("=index := %d ,err := %s", i, utils.Format4Output(err, false))

View File

@@ -328,6 +328,7 @@ func (a *API) GetStoreFreight(storeId int64) ([]int64, error) {
//获取运费模板详情
func (a *API) GetStoreFreightDetail(freightId int64) (*freightTemplate_detail_response.Data, error) {
request := freightTemplate_detail_request.New()
request.Param.FreightId = freightId
result, err := request.Execute(a.accessTokenObj)
if err != nil {
return nil, err

View File

@@ -31,7 +31,8 @@ import (
"time"
)
//var token = `{"access_token":"f1ee4188-d49a-4eaf-9cb8-7d754a23d19e","expires_in":1678053416,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"08ce6c28-37b4-4c3e-9942-7d078c551bc2","authority_id":""}`
var token2 = `{"access_token":"26a0ee33-fca9-4b80-980a-3d6cf48ca159","expires_in":1678656378,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"ef12dcb4-766d-4e6b-905d-448a25279431","authority_id":""}`
var api2 = New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token2)
//创建店铺
func TestCreateStore(t *testing.T) {
@@ -558,3 +559,9 @@ func TryUnmarshalUseNumber(data []byte, result interface{}) error {
d.UseNumber()
return d.Decode(result)
}
func TestGetStoreFreightDetail(t *testing.T) {
detail, err := api2.GetStoreFreightDetail(25370494)
fmt.Println(utils.Format4Output(detail, false))
fmt.Println(err)
}

View File

@@ -1,6 +1,7 @@
package tiktok_api
import (
"encoding/json"
"fmt"
"testing"
)
@@ -42,3 +43,23 @@ func TestGetShipmentInfo(t *testing.T) {
func TestGetStoreAutoCallRiderInfo(t *testing.T) {
a.GetStoreAutoCallRiderInfo(64212030)
}
func TestMap2(t *testing.T) {
aa := `{
"四川":[
{"张淋":"18981810340"},{"李伟达":"18988808752"},
{"张淋":"18981810340"},{"李伟达":"18988808752"}
],
"广州":[
{"张淋":"18981810340"},{"李伟达":"18988808752"},
{"张淋":"18981810340"},{"李伟达":"18988808752"}
],
"西安":[
{"张淋":"18981810340"},{"李伟达":"18988808752"},
{"张淋":"18981810340"},{"李伟达":"18988808752"}
]
}`
list := make(map[string][]map[string]string, 0)
json.Unmarshal([]byte(aa), &list)
t.Log(list)
}