diff --git a/platformapi/fnpsapi/order.go b/platformapi/fnpsapi/order.go index caa0cb0a..d7d31288 100644 --- a/platformapi/fnpsapi/order.go +++ b/platformapi/fnpsapi/order.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" "git.rosy.net.cn/baseapi/utils" - "git.rosy.net.cn/jx-callback/globals" "time" ) @@ -182,7 +181,6 @@ func (a *API) CancelOrder(req *CancelOrderReq) (err error) { orderHead["business_data"] = string(business) data, err := a.AccessAPI(ApiURL, "cancelOrder", RequestPost, orderHead) - globals.SugarLogger.Debugf("======data : %s", utils.Format4Output(data, false)) if err != nil { return err } diff --git a/platformapi/tao_vegetable/store_categary.go b/platformapi/tao_vegetable/store_categary.go index 5aa26819..9c58bb92 100644 --- a/platformapi/tao_vegetable/store_categary.go +++ b/platformapi/tao_vegetable/store_categary.go @@ -71,7 +71,7 @@ func (a *API) AddStoreCategoryInfo(param *request.AlibabaWdkSkuCategoryAddReques // DeleteStoreCategoryInfo 删除门店分类 func (a *API) DeleteStoreCategoryInfo(param *request.AlibabaWdkSkuCategoryDeleteRequest) error { - return nil // 不支持程序删除 + //return nil // 不支持程序删除 globals.SugarLogger.Debugf("进入 DeleteStoreCategoryInfo") storeCategory := ability587.NewAbility587(&a.client) resp, _ := storeCategory.AlibabaWdkSkuCategoryDelete(param, a.token) diff --git a/platformapi/tao_vegetable/store_test.go b/platformapi/tao_vegetable/store_test.go index 8f071e13..9afbb871 100644 --- a/platformapi/tao_vegetable/store_test.go +++ b/platformapi/tao_vegetable/store_test.go @@ -53,7 +53,7 @@ func TestGetStoreAllCategory(t *testing.T) { func TestAddCategory(t *testing.T) { data, err := apiTao.AddStoreCategoryInfo(&request.AlibabaWdkSkuCategoryAddRequest{Param: &domain.AlibabaWdkSkuCategoryAddCategoryDo{ - Code: utils.String2Pointer("127382"), + Code: utils.String2Pointer("175"), Name: utils.String2Pointer("赠品专区"), Leaf: utils.Bool2Point(false), }}) @@ -74,7 +74,7 @@ func TestDeleteCategory(t *testing.T) { } func TestDeleteCate(t *testing.T) { - err := apiTao.DeleteStoreCategoryInfo(&request.AlibabaWdkSkuCategoryDeleteRequest{Param: &domain.AlibabaWdkSkuCategoryDeleteCategoryDo{Code: utils.String2Pointer("127402")}}) + err := apiTao.DeleteStoreCategoryInfo(&request.AlibabaWdkSkuCategoryDeleteRequest{Param: &domain.AlibabaWdkSkuCategoryDeleteCategoryDo{Code: utils.String2Pointer("175")}}) fmt.Println(err) } diff --git a/platformapi/tao_vegetable/tao_consts.go b/platformapi/tao_vegetable/tao_consts.go index 257dcc42..bd121879 100644 --- a/platformapi/tao_vegetable/tao_consts.go +++ b/platformapi/tao_vegetable/tao_consts.go @@ -48,6 +48,7 @@ const ( OrderDeliveryTypeStore = 2 // 商家自配 ChannelCome = 31 // 3:饿了么 4:盒马&淘鲜达 18:大润发飞牛 19:欧尚外卖 20:商家自有渠道 31 ??? IsAllowAppSale = 1 // 是否在app销售打开,默认1,0否 + NameMaxLength = 60 // 最大名称长度 ) const ( diff --git a/platformapi/tiktok_shop/tiktok_api/afs_test.go b/platformapi/tiktok_shop/tiktok_api/afs_test.go index a5271778..86dcd13a 100644 --- a/platformapi/tiktok_shop/tiktok_api/afs_test.go +++ b/platformapi/tiktok_shop/tiktok_api/afs_test.go @@ -18,7 +18,7 @@ import ( // "authority_id": "" //}` -var token = `{"access_token":"09e5b626-418f-4780-ab33-857ba8f69b49","expires_in":1684077242,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"04a82701-a439-4dad-a20a-48299b0dffcd","authority_id":""}` +var token = `{"access_token":"ec2e3053-73dc-4e39-87ba-db081bbb55df","expires_in":1689492851,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"f7d2e88c-28c6-46bd-b63a-3d3c49ce0c76","authority_id":""}` //var token = `{"access_token":"e3173e9f-266f-4d87-88e7-e7cd837bc9d9","expires_in":1672882632,"scope":"SCOPE","shop_id":68023619,"shop_name":"京西到家","refresh_token":"5070aae2-493f-46bd-b5d6-6ea0cd64729f","authority_id":""}` diff --git a/platformapi/tiktok_shop/tiktok_api/sku.go b/platformapi/tiktok_shop/tiktok_api/sku.go index 56a739f7..bc9f745b 100644 --- a/platformapi/tiktok_shop/tiktok_api/sku.go +++ b/platformapi/tiktok_shop/tiktok_api/sku.go @@ -404,6 +404,7 @@ type YunDecrypt struct { // OrderUserInfoDecrypt 用户信息解密(此接口转入云鼎服务器,将不再直接通信) func (a *API) OrderUserInfoDecrypt(orderId, name, tel, address string) (string, string, string, error) { url := "http://ddy.jxc4.com/tt/decrypt" + //url := "http://180.184.32.54:8080/tt/decrypt" accessToken, err := json.Marshal(a.accessTokenObj.CreateTokenData) if err != nil { return "", "", "", err diff --git a/platformapi/tiktok_shop/tiktok_api/sku_test.go b/platformapi/tiktok_shop/tiktok_api/sku_test.go index 3d931aad..d748da63 100644 --- a/platformapi/tiktok_shop/tiktok_api/sku_test.go +++ b/platformapi/tiktok_shop/tiktok_api/sku_test.go @@ -111,20 +111,16 @@ func TestEditStoreCommodity2(t *testing.T) { }) } -// 下架 -func TestProductSetOffline(t *testing.T) { - token := `{"access_token":"a1746210-a8a3-4497-a87b-09d1f10dbb95","expires_in":1665652230,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"c1cf8d88-0983-4f2a-b969-3746fae6b0cd","authority_id":""}` - a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token) - a.ProductSetOffline(3576377564144516403) -} - // 解密购买用户电话,名字,地址 func TestBatchDecrypt(t *testing.T) { a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token) - encrypt_post_tel := "##mjApaTO5LNGFDnAU2UmRwu1zhlDQH2+NjIc9kTlQzUYpf1XXrxyxUzd1nWdTPb9H3iFNAdFG66zReSdhf6qUtNVBwNEn5RnIM8wQapxFjh4v+g==*CgkIARCtHCABKAESPgo81dqD65kMclp62fAJBLUpNOP22AKtaL8/7CHDPtDCS8wVtCp/TWhRNLsuFrq/Pmhhz+fe3GDtG8R/L0O0GgA=#1##" - encrypt_post_receiver := "##Cg8e7Ks78U0rSX7AO6NxoD9pPtISczJdulakYdCJDNqXLsFMfhG/0mz7CoxJJyY7zRvx1dkFKahgRk0NCsAxApns7NaaGDu9tyEXloBu9Sc=*CgkIARCtHCABKAESPgo8ja2mXE+INEhReF2W0+deMN0qb/ZoPtaxS98YbR4a1smRO4WPj+jSiYsBv00+DxiXfJTW3DdxusF6TVS3GgA=#1##" - encrypt_post_name := `` - name, tel, address, err := a.OrderUserInfoDecrypt("6917547162766021688", encrypt_post_name, encrypt_post_tel, encrypt_post_receiver) + orderID := "6919995408850359976" + order, err := a.GetTiktokOrderDetail(orderID) + if err != nil || order == nil { + globals.SugarLogger.Debugf("GetTiktokOrderDetail err := %s", utils.Format4Output(order, false)) + return + } + name, tel, address, _ := a.OrderUserInfoDecrypt(orderID, order.EncryptPostReceiver, order.EncryptPostTel, order.PostAddr.EncryptDetail) fmt.Println(name) fmt.Println(tel) fmt.Println(address)