diff --git a/platformapi/jdapi/store_test.go b/platformapi/jdapi/store_test.go index ac18300e..5912c738 100644 --- a/platformapi/jdapi/store_test.go +++ b/platformapi/jdapi/store_test.go @@ -1,6 +1,7 @@ package jdapi import ( + "fmt" "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/utils" "testing" @@ -167,4 +168,5 @@ func TestQueryMerchantMemberInfo(t *testing.T) { } func Test1111(t *testing.T) { + fmt.Println(len("我爱你 ml1")) } diff --git a/platformapi/tiktok_shop/sdk-golang/api/product_auditList/request/product_auditList_request.go b/platformapi/tiktok_shop/sdk-golang/api/product_auditList/request/product_auditList_request.go index 025ee10e..03112b8e 100644 --- a/platformapi/tiktok_shop/sdk-golang/api/product_auditList/request/product_auditList_request.go +++ b/platformapi/tiktok_shop/sdk-golang/api/product_auditList/request/product_auditList_request.go @@ -2,6 +2,8 @@ package product_auditList_request import ( "encoding/json" + product_auditList_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_auditList/response" + doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core" ) type ProductAuditListRequest struct { diff --git a/platformapi/tiktok_shop/sdk-golang/api/product_auditList/response/product_auditList_response.go b/platformapi/tiktok_shop/sdk-golang/api/product_auditList/response/product_auditList_response.go index e3fe6825..ecb492f2 100644 --- a/platformapi/tiktok_shop/sdk-golang/api/product_auditList/response/product_auditList_response.go +++ b/platformapi/tiktok_shop/sdk-golang/api/product_auditList/response/product_auditList_response.go @@ -1,5 +1,7 @@ package product_auditList_response +import doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core" + type ProductAuditListResponse struct { doudian_sdk.BaseDoudianOpApiResponse Data *ProductAuditListData `json:"data"` diff --git a/platformapi/tiktok_shop/tiktok_api/sku.go b/platformapi/tiktok_shop/tiktok_api/sku.go index 559f5f9c..d4494468 100644 --- a/platformapi/tiktok_shop/tiktok_api/sku.go +++ b/platformapi/tiktok_shop/tiktok_api/sku.go @@ -8,6 +8,8 @@ import ( order_batchSensitive_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/order_batchSensitive/request" product_addV2_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_addV2/request" product_addV2_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_addV2/response" + product_auditList_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_auditList/request" + product_auditList_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_auditList/response" product_del_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_del/request" product_detail_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_detail/request" product_detail_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_detail/response" @@ -8144,3 +8146,21 @@ func (a *API) GetProductUpdateRule2(categoryId int64) bool { } return result.Data.AfterSaleRule.SupplyDayReturnRule.Enable } + +// GetProductAuditList 获取商品的审核记录 +func (a *API) GetProductAuditList(page, pageSize, status int64) ([]product_auditList_response.RecordsItem, error) { + request := product_auditList_request.New() + request.Param.PublishStatus = status + request.Param.Page = page + request.Param.Size = pageSize + + result, err := request.Execute(a.accessTokenObj) + if err != nil { + return nil, err + } + if result.Code != RequestSuccessCode { + return nil, errors.New(result.SubMsg) + } + + return result.Data.Records, nil +} diff --git a/platformapi/tiktok_shop/tiktok_api/sku_test.go b/platformapi/tiktok_shop/tiktok_api/sku_test.go index 791e4a94..7fef759a 100644 --- a/platformapi/tiktok_shop/tiktok_api/sku_test.go +++ b/platformapi/tiktok_shop/tiktok_api/sku_test.go @@ -318,7 +318,7 @@ func TestBatchDecrypt(t *testing.T) { func TestGetSkuList(t *testing.T) { result, err := a.GetSkuDetailList(&product_listV2_request.ProductListV2Param{ Status: 0, - CheckStatus: 3, + CheckStatus: 4, ProductType: 0, StartTime: 0, EndTime: 0, @@ -326,7 +326,6 @@ func TestGetSkuList(t *testing.T) { Size: 100, UpdateStartTime: 0, UpdateEndTime: 0, - //StoreId: 65402632, }) for _, v := range result.Data { @@ -385,3 +384,17 @@ func TestNameeeee(t *testing.T) { func TestGetProductUpdateRule2(t *testing.T) { a.GetProductUpdateRule2(20219) } + +func TestPPPPPPPPPPPPPP(t *testing.T) { + aa := "该商品类目选择错误,推荐放置在“面条/挂面(待煮面条)”类目中." + + for _, v := range strings.Split(aa, "“") { + fmt.Println(v) + } +} + +func TestGetProductAuditList(t *testing.T) { + data, err := a.GetProductAuditList(1, 100, 2) + globals.SugarLogger.Debugf("data %s", utils.Format4Output(data, false)) + globals.SugarLogger.Debugf("data %s", err) +}