diff --git a/platformapi/ebaiapi/order.go b/platformapi/ebaiapi/order.go index 5a544937..bc8d2986 100644 --- a/platformapi/ebaiapi/order.go +++ b/platformapi/ebaiapi/order.go @@ -592,7 +592,7 @@ func (a *API) OrderDisagreeRefund(param *RefundOrderExamine) (err error) { //return err } -//售后 同意用户多次部分取消 +// 商家主动发起多次部分退 func (a *API) OrderPartRefund(orderID string, removeSkuList []*RefundSku) (err error) { //return a.EbaiRefundOrder(param) @@ -603,7 +603,7 @@ func (a *API) OrderPartRefund(orderID string, removeSkuList []*RefundSku) (err e return err } -//售后 同意用户多次部分取消 +// 用户多次退商家同意 func (a *API) OrderAgreePartRefund(param *RefundOrderExamine) (err error) { return a.EbaiRefundOrder(param) @@ -671,7 +671,9 @@ func (a *API) GetReverseOrder(orderId string) ([]interface{}, error) { if err != nil { return nil, err } - + if len(refundOrder.Data.(map[string]interface{})["reverse_order_list"].([]interface{})[0].(map[string]interface{})) == 0 { + return nil, nil + } return refundOrder.Data.(map[string]interface{})["reverse_order_list"].([]interface{})[0].(map[string]interface{})["sub_reverse_order_list"].([]interface{}), nil } diff --git a/platformapi/ebaiapi/order_test.go b/platformapi/ebaiapi/order_test.go index 8db7f303..24666e65 100644 --- a/platformapi/ebaiapi/order_test.go +++ b/platformapi/ebaiapi/order_test.go @@ -23,14 +23,14 @@ func TestOrderGet(t *testing.T) { func TestOrderAgreePartRefund(t *testing.T) { param := &RefundOrderExamine{ - OrderId: "4015750049354953219", + OrderId: "4003000128728616633", IdempotentId: utils.Int64ToStr(time.Now().UnixNano()), ActionType: RefundTypeAgree, ReasonCode: "", ReasonRemarks: "", } refundProductList := make([]*RefundProductList, 0, 0) - date, _ := api.GetReverseOrder("4035480124822912660") + date, _ := api.GetReverseOrder("4003000128728616633") for _, v := range date { v2 := v.(map[string]interface{}) refundProduct := &RefundProductList{ diff --git a/platformapi/mtwmapi/comment.go b/platformapi/mtwmapi/comment.go index 14b877ea..f6c4539b 100644 --- a/platformapi/mtwmapi/comment.go +++ b/platformapi/mtwmapi/comment.go @@ -62,12 +62,12 @@ func (a *API) CommentQuery(poiCode string, startDateStr, endDateStr string, offs params["pagesize"] = limit result, err := a.AccessAPI("comment/query", true, params) if err != nil { - return nil, err + break } var batchCommentList []*OrderComment err = utils.Map2StructByJson(result, &batchCommentList, false) if err != nil { - return nil, err + break } for _, comment := range batchCommentList { if comment.CommentLables != "" { diff --git a/platformapi/mtwmapi/comment_test.go b/platformapi/mtwmapi/comment_test.go index 993d71c1..e2bc1ddd 100644 --- a/platformapi/mtwmapi/comment_test.go +++ b/platformapi/mtwmapi/comment_test.go @@ -8,7 +8,7 @@ import ( ) func TestCommentQuery(t *testing.T) { - result, err := api.CommentQuery("18026738", "20230711", "20230717", 0, 0, CommentReplyStatusNotReplied) + result, err := api.CommentQuery("18805464", "20231009", "20231011", 0, 0, CommentReplyStatusNotReplied) if err != nil { t.Fatal(err) } diff --git a/platformapi/mtwmapi/mtwmapi_test.go b/platformapi/mtwmapi/mtwmapi_test.go index 3ed0a4ee..17f221c1 100644 --- a/platformapi/mtwmapi/mtwmapi_test.go +++ b/platformapi/mtwmapi/mtwmapi_test.go @@ -27,7 +27,8 @@ func init() { //商超 //api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_nngsVP37s-HXY86xe85H7Q") //token_n4TwqCntWWuvQwAawzxC0w - api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_gdlIEWwQnWhl8xzj8rtPTw") //token_n4TwqCntWWuvQwAawzxC0w + api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_rfAD6OxSVxkTeCO1XmNCZg") //token_n4TwqCntWWuvQwAawzxC0w + //api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_r36FEse6_ywebQI65FNNWA") //token_n4TwqCntWWuvQwAawzxC0w cookieStr := ` acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1; ` diff --git a/platformapi/mtwmapi/retail.go b/platformapi/mtwmapi/retail.go index 0fdfeec2..ec676df0 100644 --- a/platformapi/mtwmapi/retail.go +++ b/platformapi/mtwmapi/retail.go @@ -291,7 +291,6 @@ func (a *API) RetailInitData(trackInfo, poiCode, foodCode string, params map[str } func (a *API) RetailBatchInitData(trackInfo, poiCode string, foodDataList []map[string]interface{}) (failedFoodList []*AppFoodResult, err error) { - globals.SugarLogger.Debugf("foodDataList :%s", utils.Format4Output(foodDataList, false)) result, err := a.AccessAPI2("retail/batchinitdata", false, map[string]interface{}{ KeyAppPoiCode: poiCode, "food_data": string(utils.MustMarshal(foodDataList)), @@ -300,7 +299,7 @@ func (a *API) RetailBatchInitData(trackInfo, poiCode string, foodDataList []map[ failedFoodList, err = handleRetailBatchResult(result) } globals.SugarLogger.Debugf("result :%s", utils.Format4Output(result, false)) - globals.SugarLogger.Debugf("err :%s", utils.Format4Output(err, false)) + globals.SugarLogger.Debugf("err :%v", err) return failedFoodList, err } diff --git a/platformapi/tao_vegetable/api_model.go b/platformapi/tao_vegetable/api_model.go index a44ceb9b..52f824af 100644 --- a/platformapi/tao_vegetable/api_model.go +++ b/platformapi/tao_vegetable/api_model.go @@ -62,3 +62,19 @@ func CallBackResultSign(err error) *CallBackResult { ErrMsg: err.Error(), } } + +// CallBackResultOnSaleCancel 售中取消允许开关 +func CallBackResultOnSaleCancel(err error) *CallBackResult { + if err == nil { + return &CallBackResult{ + Success: true, + ErrCode: "SUCCESS", + ErrMsg: "成功", + } + } + return &CallBackResult{ + Success: false, + ErrCode: "NOT_SUPPORT_INSALE_CANCEL", + ErrMsg: "不支持售中取消。", + } +} diff --git a/platformapi/tao_vegetable/order_delivery.go b/platformapi/tao_vegetable/order_delivery.go index 93760577..6791cebf 100644 --- a/platformapi/tao_vegetable/order_delivery.go +++ b/platformapi/tao_vegetable/order_delivery.go @@ -27,12 +27,9 @@ func (a *API) ReaderOrderInfo(c *http.Request) (*CallbackOrder, string, error) { // QueryOrderDetail 自配送查询订单详情 func (a *API) QueryOrderDetail(req *request2.AlibabaAelophyOrderGetRequest) (*domain.AlibabaAelophyOrderGetOrderResponse, error) { - //globals.SugarLogger.Debugf("进入 QueryOrderDetail") client := ability591.NewAbility591(&a.client) data, _ := client.AlibabaAelophyOrderGet(req, a.token) - if !*data.ApiResult.Success { - //globals.SugarLogger.Debugf("requestId[%s],err[%s]", data.RequestId, utils.Format4Output(data, false)) return nil, fmt.Errorf(*data.ApiResult.ErrMsg) } diff --git a/platformapi/tao_vegetable/order_test.go b/platformapi/tao_vegetable/order_test.go index 078bfb84..eb7d15f3 100644 --- a/platformapi/tao_vegetable/order_test.go +++ b/platformapi/tao_vegetable/order_test.go @@ -23,8 +23,8 @@ func TestName(t *testing.T) { } func TestGetOrderDetail(t *testing.T) { requestParam := &request591.AlibabaAelophyOrderGetRequest{OrderGetRequest: &domain591.AlibabaAelophyOrderGetOrderGetRequest{ - StoreId: utils.String2Pointer("JX101983"), - BizOrderId: utils.Int64ToPointer(5000921008118200880), + StoreId: utils.String2Pointer("JX102956"), + BizOrderId: utils.Int64ToPointer(5000947260022600875), }} data, err := apiTao.QueryOrderDetail(requestParam) globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false)) @@ -61,12 +61,12 @@ func TestQueryAfsOrderDetail(t *testing.T) { func TestDeliveryFinishACCEPTED(t *testing.T) { param := &request591.AlibabaAelophyOrderWorkCallbackRequest{} param.WorkCallbackRequest = &domain591.AlibabaAelophyOrderWorkCallbackWorkCallbackRequest{ - StoreId: utils.String2Pointer("JX667321"), - BizOrderId: utils.Int64ToPointer(5000909465906250087), - Status: utils.String2Pointer("SIGN"), - StatusRemark: nil, - DelivererName: utils.String2Pointer("张廷"), - DelivererPhone: utils.String2Pointer("SIGN"), + StoreId: utils.String2Pointer("JX102985"), + BizOrderId: utils.Int64ToPointer(5000947518268240783), + Status: utils.String2Pointer(OrderStatusNew), + StatusRemark: nil, + //DelivererName: utils.String2Pointer("张廷"), + //DelivererPhone: utils.String2Pointer("SIGN"), WorkCallbackSubOrderInfoList: nil, DelivererCompany: nil, LogisticsNo: nil, diff --git a/platformapi/tao_vegetable/store_sku.go b/platformapi/tao_vegetable/store_sku.go index e1e3b900..cc329311 100644 --- a/platformapi/tao_vegetable/store_sku.go +++ b/platformapi/tao_vegetable/store_sku.go @@ -17,7 +17,6 @@ import ( // AddStoreSku 新增门店商品 func (a *API) AddStoreSku(param *request.AlibabaWdkSkuAddRequest) (*[]VegetableResultList, error) { - globals.SugarLogger.Debugf("=========AddStoreSku taboabo") client := ability585.NewAbility585(&a.client) data, _ := client.AlibabaWdkSkuAdd(param, a.token) var foodList = make([]VegetableResultList, 0, len(*data.Result.Models)) diff --git a/platformapi/tao_vegetable/tao_consts.go b/platformapi/tao_vegetable/tao_consts.go index bd121879..7c7a878e 100644 --- a/platformapi/tao_vegetable/tao_consts.go +++ b/platformapi/tao_vegetable/tao_consts.go @@ -65,8 +65,8 @@ const MAXHandleCount = 20 // 批量处理一次最大数据量 // 订单状态通知 const ( - OrderStatusNew = "ACCEPTED" // 商户接单 OrderStatusPayFinsh = "PAID" // 订单支付完成 + OrderStatusNew = "ACCEPTED" // 商户接单 OrderStatusPickedUp = "PICKED" // 拣货完成 OrderStatusCallRider = "PACKAGED" // 打包出库(呼叫骑手,骑手到店,骑手取货) OrderStatusDelivery = "SHIPPING" // 配送中 diff --git a/platformapi/tiktok_shop/sdk-golang/api/product_detail/request/product_detail_request.go b/platformapi/tiktok_shop/sdk-golang/api/product_detail/request/product_detail_request.go index 6dd6b737..2007f519 100644 --- a/platformapi/tiktok_shop/sdk-golang/api/product_detail/request/product_detail_request.go +++ b/platformapi/tiktok_shop/sdk-golang/api/product_detail/request/product_detail_request.go @@ -48,7 +48,7 @@ type ProductDetailParam struct { // 商品ID,抖店系统生成,店铺下唯一;长度19位。 ProductId string `json:"product_id"` // 外部商家编码,商家自定义字段 - //OutProductId string `json:"out_product_id"` + OutProductId string `json:"out_product_id"` //// true:读取草稿数据;false:读取线上数据;不传默认为false //ShowDraft string `json:"show_draft"` } diff --git a/platformapi/tiktok_shop/tiktok_api/afs_test.go b/platformapi/tiktok_shop/tiktok_api/afs_test.go index e9aa38b0..8cacbf70 100644 --- a/platformapi/tiktok_shop/tiktok_api/afs_test.go +++ b/platformapi/tiktok_shop/tiktok_api/afs_test.go @@ -7,8 +7,7 @@ import ( "testing" ) -var token = `{"access_token":"719db06b-3fbf-461b-8cf2-e5ae70293cdc","expires_in":1695876413,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"8c478de3-8fbd-4535-a78c-06792b8a20a4","authority_id":""}` - +var token = `{"access_token":"90283046-8f2b-46cf-90f1-e522b229e784","expires_in":1697080460,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"ae493f0f-97d8-43ca-9b0e-727480add1fa","authority_id":""}` var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token) // 查询售后单详情 diff --git a/platformapi/tiktok_shop/tiktok_api/settl_bill_detail_test.go b/platformapi/tiktok_shop/tiktok_api/settl_bill_detail_test.go index dabc7cfb..c06a4add 100644 --- a/platformapi/tiktok_shop/tiktok_api/settl_bill_detail_test.go +++ b/platformapi/tiktok_shop/tiktok_api/settl_bill_detail_test.go @@ -7,9 +7,12 @@ import ( ) func TestBillDetail(t *testing.T) { + var token = `{"access_token":"90283046-8f2b-46cf-90f1-e522b229e784","expires_in":1697080460,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"ae493f0f-97d8-43ca-9b0e-727480add1fa","authority_id":""}` + var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token) + a.GetSettleBillDetailV3(&order_getSettleBillDetailV3_request.OrderGetSettleBillDetailV3Param{ Size: 10, - OrderId: "5035210591285239695", + OrderId: "6922140885578684202", }) } diff --git a/platformapi/tiktok_shop/tiktok_api/sku.go b/platformapi/tiktok_shop/tiktok_api/sku.go index bc9f745b..7fb35163 100644 --- a/platformapi/tiktok_shop/tiktok_api/sku.go +++ b/platformapi/tiktok_shop/tiktok_api/sku.go @@ -281,6 +281,9 @@ func (a *API) GetSkuDetail(productId, outProductId string) (*product_detail_resp if productId != "" { param.ProductId = productId } + if outProductId != "" { + param.OutProductId = outProductId + } result, err := request.Execute(a.accessTokenObj) if err != nil { @@ -571,6 +574,60 @@ func (a *API) GetProductAuditList(page, pageSize, status int64) ([]product_audit return result.Data.Records, result.Data.Total, nil } +// GetRecommendCategoryByName 根据名称预测商品类目,优先四级>三级>二级>1级 +func (a *API) GetRecommendCategoryByName(name string) (int64, error) { + if name == "" { + return 0, errors.New("抖音根据名称预测分类,名称不能为空") + } + request := product_GetRecommendCategory_request.New() + request.Param.Scene = "category_infer" + request.Param.Name = name + + result, err := request.Execute(a.accessTokenObj) + if err != nil { + return 0, err + } + if result.Code != RequestSuccessCode { + return 0, errors.New(result.SubMsg + ":" + result.LogId) + } + + if len(result.Data.CategoryDetails) == 0 { + return 0, errors.New("抖音根据图片获取分类,返回值为0") + } + + var firstCid int64 + var secondCid int64 + var thirdCid int64 + var fourthCid int64 + + index := len(result.Data.CategoryDetails) - 1 + if result.Data.CategoryDetails[index].CategoryDetail.FirstCid != 0 { + firstCid = result.Data.CategoryDetails[index].CategoryDetail.FirstCid + } + if result.Data.CategoryDetails[index].CategoryDetail.SecondCid != 0 { + secondCid = result.Data.CategoryDetails[index].CategoryDetail.SecondCid + } + if result.Data.CategoryDetails[index].CategoryDetail.ThirdCid != 0 { + thirdCid = result.Data.CategoryDetails[index].CategoryDetail.ThirdCid + } + if result.Data.CategoryDetails[index].CategoryDetail.FourthCid != 0 { + fourthCid = result.Data.CategoryDetails[index].CategoryDetail.FourthCid + } + if fourthCid != 0 { + return fourthCid, nil + } + if thirdCid != 0 { + return thirdCid, nil + } + if secondCid != 0 { + return secondCid, nil + } + if firstCid != 0 { + return firstCid, nil + } + return 0, errors.New("抖音获取推荐分类异常") +} + // GetRecommendCategory 根据图片预测商品类目,优先四级>三级>二级>1级 func (a *API) GetRecommendCategory(picParams []string) (int64, error) { if len(picParams) == 0 { @@ -637,6 +694,8 @@ func (a *API) CreateSubProduct(mainProductId int64, storeId int64) (int64, error request.Param.StoreId = storeId result, err := request.Execute(a.accessTokenObj) + globals.SugarLogger.Debugf("=========result := %s", utils.Format4Output(result, false)) + globals.SugarLogger.Debugf("=========result := %s", utils.Format4Output(err, false)) if err != nil { return 0, err } diff --git a/platformapi/tiktok_shop/tiktok_api/sku_delete_test.go b/platformapi/tiktok_shop/tiktok_api/sku_delete_test.go index fddca0f6..6359c7d7 100644 --- a/platformapi/tiktok_shop/tiktok_api/sku_delete_test.go +++ b/platformapi/tiktok_shop/tiktok_api/sku_delete_test.go @@ -18,9 +18,18 @@ func TestN2ame(t *testing.T) { } func TestGetRecommendCategory(t *testing.T) { - img, _, err := GetTiktokImgListTest(a, "668707", "", "", "http://img20.360buyimg.com/vc/jfs/t1/8979/39/8591/236012/5c0e45f3E1537c120/a66aafc95cf66977.jpg", "http://img20.360buyimg.com/vc/jfs/t1/23027/3/955/82830/5c0e45f3E0855eeae/ae65ee9555a29579.jpg") - fmt.Println(err) - data, err := a.GetRecommendCategory(strings.Split(img, "|")) + //img, _, err := GetTiktokImgListTest(a, "668707", "", "", "http://img20.360buyimg.com/vc/jfs/t1/8979/39/8591/236012/5c0e45f3E1537c120/a66aafc95cf66977.jpg", "http://img20.360buyimg.com/vc/jfs/t1/23027/3/955/82830/5c0e45f3E0855eeae/ae65ee9555a29579.jpg") + //fmt.Println(err) + //img := []string{ + // //"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/VqGYBUaL_m_f229ad3ce7a93d906a2412709e363825_sx_762890_www750-3527", + // "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/VqGYBUaL_m_7457cda4c101d05bcd2a1258b61d2ba1_sx_223234_www800-800", + // //"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/v1_GhxlaZ_70852585116381186630419_c55b8401b00e96e4114431a1dbd7c99c_sx_582346_www1000-1000", + //} + var token = `{"access_token":"90283046-8f2b-46cf-90f1-e522b229e784","expires_in":1697080460,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"ae493f0f-97d8-43ca-9b0e-727480add1fa","authority_id":""}` + var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token) + + name := "广茄 " + data, err := a.GetRecommendCategoryByName(name) fmt.Println(data) fmt.Println(err) } diff --git a/platformapi/tiktok_shop/tiktok_api/sku_test.go b/platformapi/tiktok_shop/tiktok_api/sku_test.go index cf99a62d..4dc4c3c6 100644 --- a/platformapi/tiktok_shop/tiktok_api/sku_test.go +++ b/platformapi/tiktok_shop/tiktok_api/sku_test.go @@ -55,7 +55,10 @@ func TestGetSkuDetail(t *testing.T) { // 查询商品详情本地商品id func TestGetSkuDetailLocalId(t *testing.T) { - data, err := a.GetSkuDetail("3592382914735826936", "") + var token = `{"access_token":"90283046-8f2b-46cf-90f1-e522b229e784","expires_in":1697080460,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"ae493f0f-97d8-43ca-9b0e-727480add1fa","authority_id":""}` + var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token) + + data, err := a.GetSkuDetail("3592503538749683119", "") fmt.Println(err) globals.SugarLogger.Debugf("====%s", utils.Format4Output(data, false)) } diff --git a/platformapi/tiktok_shop/tiktok_api/store_test.go b/platformapi/tiktok_shop/tiktok_api/store_test.go index 6c140e0b..924b9001 100644 --- a/platformapi/tiktok_shop/tiktok_api/store_test.go +++ b/platformapi/tiktok_shop/tiktok_api/store_test.go @@ -285,10 +285,8 @@ func TestGetWarehouseByStore(t *testing.T) { storeIDs := []int64{87542533} need := []int64{} errList := errlist.New() - var str = `{"access_token":"719db06b-3fbf-461b-8cf2-e5ae70293cdc","expires_in":1695876413,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"8c478de3-8fbd-4535-a78c-06792b8a20a4","authority_id":""}` - var apis = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", str) for _, v := range storeIDs { - resp, err := apis.GetWarehouseByStore(v) + resp, err := a.GetWarehouseByStore(v) if resp.WarehouseInfoMap[utils.Int64ToStr(v)] == nil || len(resp.WarehouseInfoMap[utils.Int64ToStr(v)][0].OutFenceIds) == 0 { need = append(need, v) } else { @@ -483,10 +481,8 @@ func TestCreateWarehouse(t *testing.T) { // 批量创建区域仓 func TestBatchCreateWarehouse(t *testing.T) { - token3 := `{"access_token":"719db06b-3fbf-461b-8cf2-e5ae70293cdc","expires_in":1695876413,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"8c478de3-8fbd-4535-a78c-06792b8a20a4","authority_id":""}` - a2 := New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token3) - data, err := a2.BatchCreateWarehouse(&warehouse_createBatch_request.WarehouseCreateBatchParam{ + data, err := a.BatchCreateWarehouse(&warehouse_createBatch_request.WarehouseCreateBatchParam{ OutWarehouseList: []warehouse_createBatch_request.OutWarehouseListItem{ { OutWarehouseId: "668841", @@ -507,9 +503,7 @@ func TestBatchCreateWarehouse(t *testing.T) { //查询四级地址全量省份信息 func TestGetProvince(t *testing.T) { - token3 := `{"access_token":"719db06b-3fbf-461b-8cf2-e5ae70293cdc","expires_in":1695876413,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"8c478de3-8fbd-4535-a78c-06792b8a20a4","authority_id":""}` - a2 := New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token3) - retVal, err := a2.GetProvince() + retVal, err := a.GetProvince() fmt.Println(utils.Format4Output(retVal, false)) fmt.Println(err) } diff --git a/platformapi/tiktok_shop/tiktok_api/transport_test.go b/platformapi/tiktok_shop/tiktok_api/transport_test.go index e919a9bb..4bb7332a 100644 --- a/platformapi/tiktok_shop/tiktok_api/transport_test.go +++ b/platformapi/tiktok_shop/tiktok_api/transport_test.go @@ -39,8 +39,6 @@ func Test(t *testing.T) { } func TestGetShipmentInfo(t *testing.T) { - var token = `{"access_token":"719db06b-3fbf-461b-8cf2-e5ae70293cdc","expires_in":1695876413,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"8c478de3-8fbd-4535-a78c-06792b8a20a4","authority_id":""}` - var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token) data, err := a.GetShipmentInfo(6922112012008166892, 0, ShipmentTypeInvoice) globals.SugarLogger.Debugf("======data := %s", utils.Format4Output(data, false)) globals.SugarLogger.Debugf("======data := %s", utils.Format4Output(err, false))