From 40e8b5d5330392c982b506239bee86cfb21f0416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 25 Oct 2023 10:26:19 +0800 Subject: [PATCH 1/9] 1 --- platformapi/tiktok_shop/tiktok_api/order.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformapi/tiktok_shop/tiktok_api/order.go b/platformapi/tiktok_shop/tiktok_api/order.go index eee00991..37c8e812 100644 --- a/platformapi/tiktok_shop/tiktok_api/order.go +++ b/platformapi/tiktok_shop/tiktok_api/order.go @@ -327,9 +327,9 @@ func (a *API) OrderDelivering(param *order_logisticsAdd_request.OrderLogisticsAd func (a *API) CreateOrderCallback(orderStatus []byte) (map[string][]interface{}, *CallbackResponse) { var resp []*OrderCallback if err := json.Unmarshal(orderStatus, &resp); err != nil { + fmt.Println(err) return nil, &CallbackResponse{Code: CallbackFailCode, Msg: CallbackFail} } - globals.SugarLogger.Debugf("============================resp:= %s", utils.Format4Output(resp, false)) callbackResult := make(map[string][]interface{}, 0) for _, data := range resp { From 31ecbdf60c415109895481685d87aa8a961dae3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 25 Oct 2023 16:19:31 +0800 Subject: [PATCH 2/9] 1 --- platformapi/mtwmapi/mtwmapi_test.go | 2 +- platformapi/mtwmapi/retail.go | 2 - platformapi/mtwmapi/retail_test.go | 2 +- platformapi/tao_vegetable/store_sku_test.go | 215 +----------------- .../tiktok_shop/tiktok_api/sku_test.go | 2 +- 5 files changed, 4 insertions(+), 219 deletions(-) diff --git a/platformapi/mtwmapi/mtwmapi_test.go b/platformapi/mtwmapi/mtwmapi_test.go index 2c8bd9da..f022b87b 100644 --- a/platformapi/mtwmapi/mtwmapi_test.go +++ b/platformapi/mtwmapi/mtwmapi_test.go @@ -27,7 +27,7 @@ func init() { //商超 //api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_nngsVP37s-HXY86xe85H7Q") //token_n4TwqCntWWuvQwAawzxC0w - api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_rn25Arxm_1JSvQM6CWpJzQ") //token_n4TwqCntWWuvQwAawzxC0w + api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_pSieTe4mnpJjkd0gJURL3A") //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 58fa4102..21446c67 100644 --- a/platformapi/mtwmapi/retail.go +++ b/platformapi/mtwmapi/retail.go @@ -244,8 +244,6 @@ func (a *API) RetailListAll(poiCode string, offset int) (foodList []*AppFood, er data := make([]*AppFood, 0, 0) offset = offset * GeneralMaxLimit batchList, err2 := a.RetailList(poiCode, offset, GeneralMaxLimit) // GeneralMaxLimit - globals.SugarLogger.Debugf("==========batchList %d", len(batchList)) - globals.SugarLogger.Debugf("==========batchList %s", utils.Format4Output(err2, false)) if err = err2; err == nil { data = append(data, batchList...) } diff --git a/platformapi/mtwmapi/retail_test.go b/platformapi/mtwmapi/retail_test.go index 810d3292..3decab5f 100644 --- a/platformapi/mtwmapi/retail_test.go +++ b/platformapi/mtwmapi/retail_test.go @@ -93,7 +93,7 @@ func TestRetailCatDelete(t *testing.T) { } func TestRetailList(t *testing.T) { - result, err := api.RetailList("18900165", 1, 100) + result, err := api.RetailList("785527", 1, 100) if err != nil { t.Fatal(err) } diff --git a/platformapi/tao_vegetable/store_sku_test.go b/platformapi/tao_vegetable/store_sku_test.go index 7cebb7e9..6cefcdad 100644 --- a/platformapi/tao_vegetable/store_sku_test.go +++ b/platformapi/tao_vegetable/store_sku_test.go @@ -170,220 +170,7 @@ func TestStoreSkuUpdateOffShelf(t *testing.T) { // var storeList = []int64{100930, 100871} -var skuList = []int64{ - 26125, - 22596, - 25103, - 25104, - 25105, - 24656, - 30670, - 23422, - 24097, - 30669, - 23424, - 25535, - 23620, - 23621, - 23622, - 31308, - 25022, - 25717, - 25023, - 25718, - 25685, - 27264, - 27265, - 30396, - 24300, - 23001, - 26049, - 23002, - 26050, - 23417, - 26287, - 23419, - 26289, - 30625, - 30691, - 30611, - 23291, - 30686, - 23294, - 31254, - 30672, - 30671, - 30702, - 35420, - 30687, - 30730, - 30727, - 31312, - 31238, - 24264, - 31022, - 24266, - 31229, - 30663, - 23879, - 30777, - 30889, - 30676, - 30814, - 30219, - 30675, - 30627, - 25518, - 31518, - 25519, - 35242, - 26057, - 26058, - 26447, - 26448, - 30365, - 30830, - 25412, - 30641, - 30657, - 30656, - 23818, - 31200, - 6045175, - 33638, - 31682, - 6045386, - 24935, - 35241, - 30875, - 26700, - 30888, - 26701, - 31248, - 6042133, - 34897, - 23907, - 30559, - 30363, - 6045167, - 6041753, - 30700, - 26842, - 26843, - 26040, - 35504, - 6041970, - 26065, - 6041969, - 6045177, - 6045185, - 30094, - 6045186, - 26067, - 6045232, - 31299, - 6045404, - 30667, - 30780, - 30881, - 30644, - 6041954, - 6041955, - 30639, - 30775, - 34417, - 30811, - 6045326, - 35487, - 23408, - 31020, - 23409, - 35486, - 35490, - 23411, - 25947, - 25949, - 30522, - 24120, - 25014, - 30890, - 26864, - 6040867, - 6042128, - 25665, - 30649, - 34959, - 25668, - 35503, - 30768, - 26059, - 6045098, - 31243, - 23163, - 33156, - 6039630, - 27056, - 34826, - 30635, - 30876, - 30619, - 30645, - 30904, - 31240, - 24226, - 31524, - 25936, - 32914, - 25735, - 32913, - 29645, - 33391, - 30184, - 23841, - 34354, - 30320, - 25736, - 6045549, - 24251, - 6045550, - 24253, - 31423, - 31291, - 35152, - 22840, - 27006, - 22842, - 30900, - 26641, - 30616, - 30743, - 26642, - 30807, - 26493, - 26643, - 25059, - 25158, - 26494, - 25061, - 26495, - 31275, - 25062, - 30704, - 26936, - 31815, - 33075, - 30779, - 25335, - 25336, - 22993, - 30352, - 25417, - 25696, - 23402, - 25418, - 25419, - 26908, -} +var skuList = []int64{} // 商品库存修改 func TestStoreSkuStock(t *testing.T) { diff --git a/platformapi/tiktok_shop/tiktok_api/sku_test.go b/platformapi/tiktok_shop/tiktok_api/sku_test.go index c1a55efc..2a5c7ac9 100644 --- a/platformapi/tiktok_shop/tiktok_api/sku_test.go +++ b/platformapi/tiktok_shop/tiktok_api/sku_test.go @@ -134,7 +134,7 @@ func TestBatchDecrypt(t *testing.T) { // a.OrderUserInfoSensitive("4988354190732430566") //} -var c = []int64{64270123} +var c = []int64{86794412} // 删除已经创建商品,重新同步 func TestDeleteSkuAndUploadSku(t *testing.T) { From e45bea08d3cb7f1640adbdd43621e0a10804f5a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 25 Oct 2023 16:54:01 +0800 Subject: [PATCH 3/9] 1 --- platformapi/mtwmapi/retail.go | 3 +++ platformapi/tiktok_shop/tiktok_api/order.go | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/platformapi/mtwmapi/retail.go b/platformapi/mtwmapi/retail.go index 21446c67..1f13586c 100644 --- a/platformapi/mtwmapi/retail.go +++ b/platformapi/mtwmapi/retail.go @@ -296,6 +296,9 @@ func (a *API) RetailBatchInitData(trackInfo, poiCode string, foodDataList []map[ if err == nil { failedFoodList, err = handleRetailBatchResult(result) } + globals.SugarLogger.Debugf("=============foodDataList := %s", utils.Format4Output(foodDataList, false)) + globals.SugarLogger.Debugf("=============result := %s", utils.Format4Output(result, false)) + globals.SugarLogger.Debugf("=============err := %v", err) return failedFoodList, err } diff --git a/platformapi/tiktok_shop/tiktok_api/order.go b/platformapi/tiktok_shop/tiktok_api/order.go index 37c8e812..92ca3c16 100644 --- a/platformapi/tiktok_shop/tiktok_api/order.go +++ b/platformapi/tiktok_shop/tiktok_api/order.go @@ -19,7 +19,6 @@ import ( order_orderDetail_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/order_orderDetail/response" order_searchList_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/order_searchList/request" "git.rosy.net.cn/baseapi/utils" - "git.rosy.net.cn/jx-callback/globals" "math" "time" ) @@ -466,7 +465,6 @@ func (a *API) CreateOrderCallback(orderStatus []byte) (map[string][]interface{}, if err := json.Unmarshal([]byte(data.Data), &create); err != nil { return nil, CallbackResponseErr(false) } - globals.SugarLogger.Debugf("============================data:= %s", utils.Format4Output(create, false)) callbackResult[CallbackShipmentInfoChange] = append(callbackResult[CallbackShipmentInfoChange], create) default: return nil, CallbackResponseErr(false) From 17d98991a8c692c1cce05e152027b4bd64c4da93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 25 Oct 2023 17:26:49 +0800 Subject: [PATCH 4/9] 1 --- platformapi/mtwmapi/mtwmapi_test.go | 2 +- platformapi/mtwmapi/retail.go | 28 +++++++++++++++--------- platformapi/mtwmapi/retail_test.go | 33 ++++++++++------------------- 3 files changed, 30 insertions(+), 33 deletions(-) diff --git a/platformapi/mtwmapi/mtwmapi_test.go b/platformapi/mtwmapi/mtwmapi_test.go index f022b87b..2c8bd9da 100644 --- a/platformapi/mtwmapi/mtwmapi_test.go +++ b/platformapi/mtwmapi/mtwmapi_test.go @@ -27,7 +27,7 @@ func init() { //商超 //api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_nngsVP37s-HXY86xe85H7Q") //token_n4TwqCntWWuvQwAawzxC0w - api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_pSieTe4mnpJjkd0gJURL3A") //token_n4TwqCntWWuvQwAawzxC0w + api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_rn25Arxm_1JSvQM6CWpJzQ") //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 1f13586c..b732b3c6 100644 --- a/platformapi/mtwmapi/retail.go +++ b/platformapi/mtwmapi/retail.go @@ -84,16 +84,24 @@ type AvailableTimesInfo struct { } type SkuInfo struct { - AvailableTimes *AvailableTimesInfo `json:"available_times"` - BoxNum string `json:"box_num"` - BoxPrice string `json:"box_price"` - LocationCode string `json:"location_code"` - Price string `json:"price"` - SkuID string `json:"sku_id"` - Spec string `json:"spec"` - Stock string `json:"stock"` - Upc string `json:"upc"` - Weight string `json:"weight"` + AvailableTimes *AvailableTimesInfo `json:"available_times"` + BoxNum string `json:"box_num"` + BoxPrice string `json:"box_price"` + IsSellFlag int `json:"isSellFlag"` + LadderBoxNum string `json:"ladder_box_num"` + LadderBoxPrice string `json:"ladder_box_price"` + LimitOpenSyncStockNow bool `json:"limit_open_sync_stock_now"` + LocationCode string `json:"location_code"` + MinOrderCount string `json:"min_order_count"` + Price string `json:"price"` + SkuId string `json:"sku_id"` + Spec string `json:"spec"` + Stock string `json:"stock"` + Unit string `json:"unit"` + Upc string `json:"upc"` + Weight string `json:"weight"` + WeightForUnit string `json:"weight_for_unit"` + WeightUnit string `json:"weight_unit"` } type AppFood struct { diff --git a/platformapi/mtwmapi/retail_test.go b/platformapi/mtwmapi/retail_test.go index 3decab5f..6440a2ae 100644 --- a/platformapi/mtwmapi/retail_test.go +++ b/platformapi/mtwmapi/retail_test.go @@ -175,33 +175,22 @@ func TestErrList(t *testing.T) { } func TestRetailBatchInitData(t *testing.T) { - failedFoods, err := api.RetailBatchInitData(utils.GetUUID(), "19120530", []map[string]interface{}{ + failedFoods, err := api.RetailBatchInitData(utils.GetUUID(), "19284062", []map[string]interface{}{ map[string]interface{}{ - "app_food_code": 1692848899, - "category_name": "调味用品", - "common_attr_value": "[{\"attrId\":1200000094,\"attrName\":\"产地\",\"setAttrId\":true,\"setAttrName\":true,\"setValueList\":true,\"valueList\":[{\"setValue\":true,\"setValueId\":true,\"value\":\"中国\",\"valueId\":100000050}],\"valueListIterator\":[{\"$ref\":\"$[0].valueList[0]\"}],\"valueListSize\":1},{\"attrId\":1200000135,\"attrName\":\"包装方式\",\"setAttrId\":true,\"setAttrName\":true,\"setValueList\":true,\"valueList\":[{\"setValue\":true,\"setValueId\":true,\"value\":\"袋\",\"valueId\":1300004918}],\"valueListIterator\":[{\"$ref\":\"$[1].valueList[0]\"}],\"valueListSize\":1},{\"attrId\":1200000088,\"attrName\":\"品牌\",\"setAttrId\":true,\"setAttrName\":true,\"setValueList\":true,\"valueList\":[{\"setValue\":true,\"setValueId\":true,\"value\":\"吉香居\",\"valueId\":1008695}],\"valueListIterator\":[{\"$ref\":\"$[2].valueList[0]\"}],\"valueListSize\":1}]", + "app_food_code": "mtcode_1711009019361517642", + "category_name": "野营必备", + "common_attr_value": "[{\"attrId\":1200000210,\"attrName\":\"商品类别\",\"setAttrId\":true,\"setAttrName\":true,\"setValueList\":true,\"valueList\":[{\"setValue\":true,\"setValueId\":true,\"value\":\"一次性餐盒\",\"valueId\":1300013135}],\"valueListIterator\":[{\"$ref\":\"$[0].valueList[0]\"}],\"valueListSize\":1}]", "description": "", "is_sold_out": 0, "min_order_count": 1, - "name": "吉香居 麻辣萝卜干泡菜 52g/袋", - "picture": "http://p0.meituan.net/retailsp/f2aec3c090c7ee952f61301848f27c09917081.jpg,http://p0.meituan.net/retailsp/c93074d623f04272b28d7b03fd2b8699852829.jpg,http://p0.meituan.net/retailsp/8d2ef2c6f92b7c48f3673a67fe420fbe111196.jpg", + "name": "一次性长方形牛皮纸快餐打包盒+塑料盖约500ml/个 散装", + "picture": "http://p0.meituan.net/shangouproductapi/c7c86e6777d877eb4b80d3f4718086b8100684.jpg,http://p0.meituan.net/shangouproductapi/7a035e97283073e9a97a440029aedc0f83704.jpg,http://p0.meituan.net/shangouproductapi/166d82f438e19236d4820dc42328eef1161691.jpg,http://p0.meituan.net/shangouproductapi/79b145ad0a79f839c9463048dfb5ec3e100543.jpg", "picture_contents": "", - "price": 4.5, - "sequence": -117, - "skus": ` [ - { - "ladder_box_num": "", - "ladder_box_price": "0.0", - "price": "4.5", - "sku_id": 1692848899, - "spec": "52g*1袋", - "stock": "9999", - "upc": "6926896703303", - "weight": "52" - } - ]`, - "tag_id": 200005035, - "unit": "", + "price": 25, + "sequence": -202, + "skus": []map[string]interface{}{{"available_times": `{"friday": "","monday": "","saturday": "","sunday": "","thursday": "","tuesday": "","wednesday": ""}`, "box_num": "", "box_price": "", "location_code": "", "price": "25.0", "sku_id": "", "spec": "十套", "stock": "998", "upc": "", "weight": "100"}}, + "tag_id": 200005009, + "unit": "份", }, }) if err != nil { From da07237289e6cd6360d54e3ad4d796f9f9f8a359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 25 Oct 2023 17:43:39 +0800 Subject: [PATCH 5/9] 1 --- platformapi/mtwmapi/retail.go | 1 - 1 file changed, 1 deletion(-) diff --git a/platformapi/mtwmapi/retail.go b/platformapi/mtwmapi/retail.go index b732b3c6..8e37edbd 100644 --- a/platformapi/mtwmapi/retail.go +++ b/platformapi/mtwmapi/retail.go @@ -100,7 +100,6 @@ type SkuInfo struct { Unit string `json:"unit"` Upc string `json:"upc"` Weight string `json:"weight"` - WeightForUnit string `json:"weight_for_unit"` WeightUnit string `json:"weight_unit"` } From 105dbec0750af75b317a89a30ede09bcd8402c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 25 Oct 2023 17:46:14 +0800 Subject: [PATCH 6/9] 1 --- platformapi/mtwmapi/retail.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platformapi/mtwmapi/retail.go b/platformapi/mtwmapi/retail.go index 8e37edbd..ed315dc7 100644 --- a/platformapi/mtwmapi/retail.go +++ b/platformapi/mtwmapi/retail.go @@ -100,7 +100,8 @@ type SkuInfo struct { Unit string `json:"unit"` Upc string `json:"upc"` Weight string `json:"weight"` - WeightUnit string `json:"weight_unit"` + //WeightForUnit string `json:"weight_for_unit"` // weight weight_for_unit 至多填写一个 + WeightUnit string `json:"weight_unit"` } type AppFood struct { From 008de9f0a11c175a1979fdf2a78147d843c800b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 26 Oct 2023 09:28:34 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E7=BE=8E=E5=9B=A2=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E5=88=B0=E7=BE=8E=E5=9B=A2,=E4=BF=AE?= =?UTF-8?q?=E6=94=B9skus=E5=8F=82=E6=95=B0=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformapi/mtwmapi/retail.go | 6 ++-- platformapi/mtwmapi/retail_test.go | 47 ++++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 12 deletions(-) diff --git a/platformapi/mtwmapi/retail.go b/platformapi/mtwmapi/retail.go index ed315dc7..1ccc48f1 100644 --- a/platformapi/mtwmapi/retail.go +++ b/platformapi/mtwmapi/retail.go @@ -99,9 +99,9 @@ type SkuInfo struct { Stock string `json:"stock"` Unit string `json:"unit"` Upc string `json:"upc"` - Weight string `json:"weight"` - //WeightForUnit string `json:"weight_for_unit"` // weight weight_for_unit 至多填写一个 - WeightUnit string `json:"weight_unit"` + //Weight string `json:"weight"` + WeightForUnit string `json:"weight_for_unit"` // weight weight_for_unit 至多填写一个 + WeightUnit string `json:"weight_unit"` } type AppFood struct { diff --git a/platformapi/mtwmapi/retail_test.go b/platformapi/mtwmapi/retail_test.go index 6440a2ae..1ba7b8d0 100644 --- a/platformapi/mtwmapi/retail_test.go +++ b/platformapi/mtwmapi/retail_test.go @@ -177,20 +177,49 @@ func TestErrList(t *testing.T) { func TestRetailBatchInitData(t *testing.T) { failedFoods, err := api.RetailBatchInitData(utils.GetUUID(), "19284062", []map[string]interface{}{ map[string]interface{}{ - "app_food_code": "mtcode_1711009019361517642", - "category_name": "野营必备", - "common_attr_value": "[{\"attrId\":1200000210,\"attrName\":\"商品类别\",\"setAttrId\":true,\"setAttrName\":true,\"setValueList\":true,\"valueList\":[{\"setValue\":true,\"setValueId\":true,\"value\":\"一次性餐盒\",\"valueId\":1300013135}],\"valueListIterator\":[{\"$ref\":\"$[0].valueList[0]\"}],\"valueListSize\":1}]", + "app_food_code": "1680630415808835610", + "category_name": "厨卫", + "common_attr_value": "[{\"attrId\":1200000094,\"attrName\":\"产地\",\"setAttrId\":true,\"setAttrName\":true,\"setValueList\":true,\"valueList\":[{\"setValue\":true,\"setValueId\":true,\"value\":\"中国\",\"valueId\":100000050}],\"valueListIterator\":[{\"$ref\":\"$[0].valueList[0]\"}],\"valueListSize\":1},{\"attrId\":1200000132,\"attrName\":\"国产/进口\",\"setAttrId\":true,\"setAttrName\":true,\"setValueList\":true,\"valueList\":[{\"setValue\":true,\"setValueId\":true,\"value\":\"国产\",\"valueId\":1300000003}],\"valueListIterator\":[{\"$ref\":\"$[1].valueList[0]\"}],\"valueListSize\":1},{\"attrId\":1200000210,\"attrName\":\"商品类别\",\"setAttrId\":true,\"setAttrName\":true,\"setValueList\":true,\"valueList\":[{\"setValue\":true,\"setValueId\":true,\"value\":\"其他\",\"valueId\":1300000249}],\"valueListIterator\":[{\"$ref\":\"$[2].valueList[0]\"}],\"valueListSize\":1},{\"attrId\":1200000088,\"attrName\":\"品牌\",\"setAttrId\":true,\"setAttrName\":true,\"setValueList\":true,\"valueList\":[{\"setValue\":true,\"setValueId\":true,\"value\":\"豫皇星\",\"valueId\":2533451}],\"valueListIterator\":[{\"$ref\":\"$[3].valueList[0]\"}],\"valueListSize\":1}]", "description": "", "is_sold_out": 0, "min_order_count": 1, - "name": "一次性长方形牛皮纸快餐打包盒+塑料盖约500ml/个 散装", - "picture": "http://p0.meituan.net/shangouproductapi/c7c86e6777d877eb4b80d3f4718086b8100684.jpg,http://p0.meituan.net/shangouproductapi/7a035e97283073e9a97a440029aedc0f83704.jpg,http://p0.meituan.net/shangouproductapi/166d82f438e19236d4820dc42328eef1161691.jpg,http://p0.meituan.net/shangouproductapi/79b145ad0a79f839c9463048dfb5ec3e100543.jpg", + "name": "多功能清洁膏 330g/盒", + "picture": "http://p0.meituan.net/wmproduct/1d6406c367a2f31dd1c629c10fc024d4143352.jpg,http://p0.meituan.net/wmproduct/92af919285d5720c1952462db686f8ff134176.jpg,http://p0.meituan.net/xianfu/81fa0a6f3d8c556c2ba990fac8471c24157451.jpg,http://p0.meituan.net/xianfu/89eecafad3db2dd6090f8fbb1817e10549354.jpg,http://p0.meituan.net/xianfu/8dceb0ad6317462dc0c9f2d005c2e60b48474.jpg,http://p0.meituan.net/wmproduct/69e2ceb065768ee7440d61a48c087177143299.jpg", "picture_contents": "", "price": 25, - "sequence": -202, - "skus": []map[string]interface{}{{"available_times": `{"friday": "","monday": "","saturday": "","sunday": "","thursday": "","tuesday": "","wednesday": ""}`, "box_num": "", "box_price": "", "location_code": "", "price": "25.0", "sku_id": "", "spec": "十套", "stock": "998", "upc": "", "weight": "100"}}, - "tag_id": 200005009, - "unit": "份", + "sequence": -100, + "skus": []map[string]interface{}{ + { + "available_times": map[string]string{ + "friday": "", + "monday": "", + "saturday": "", + "sunday": "", + "thursday": "", + "tuesday": "", + "wednesday": "", + }, + //"box_num": "", + //"box_price": "", + "isSellFlag": 1, + "ladder_box_num": "1", + "ladder_box_price": "0.0", + "limit_open_sync_stock_now": false, + "location_code": "", + "min_order_count": "1", + "price": "25.0", + "sku_id": "1680630417767739457", + "spec": "330g*1盒", + "stock": "998", + "unit": "份", + "upc": "6948385202395", + //"weight": "330", + "weight_unit": "克(g)", + "weight_for_unit": "330", + }, + }, + "tag_id": 200004920, + "unit": "份", }, }) if err != nil { From 4ef39e3a69ae1a15c41041db3d06d36ecb12bed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 26 Oct 2023 09:33:04 +0800 Subject: [PATCH 8/9] 1 --- platformapi/mtwmapi/retail.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platformapi/mtwmapi/retail.go b/platformapi/mtwmapi/retail.go index 1ccc48f1..c5119673 100644 --- a/platformapi/mtwmapi/retail.go +++ b/platformapi/mtwmapi/retail.go @@ -99,9 +99,9 @@ type SkuInfo struct { Stock string `json:"stock"` Unit string `json:"unit"` Upc string `json:"upc"` - //Weight string `json:"weight"` - WeightForUnit string `json:"weight_for_unit"` // weight weight_for_unit 至多填写一个 - WeightUnit string `json:"weight_unit"` + Weight string `json:"weight"` + //WeightForUnit string `json:"weight_for_unit"` // weight weight_for_unit 至多填写一个 + //WeightUnit string `json:"weight_unit"` } type AppFood struct { From c45e4c656cf5872e9a89413f13aaab9f02eef0a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 26 Oct 2023 09:44:21 +0800 Subject: [PATCH 9/9] 1 --- platformapi/mtwmapi/retail.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platformapi/mtwmapi/retail.go b/platformapi/mtwmapi/retail.go index c5119673..916e30e2 100644 --- a/platformapi/mtwmapi/retail.go +++ b/platformapi/mtwmapi/retail.go @@ -304,9 +304,9 @@ func (a *API) RetailBatchInitData(trackInfo, poiCode string, foodDataList []map[ if err == nil { failedFoodList, err = handleRetailBatchResult(result) } - globals.SugarLogger.Debugf("=============foodDataList := %s", utils.Format4Output(foodDataList, false)) - globals.SugarLogger.Debugf("=============result := %s", utils.Format4Output(result, false)) - globals.SugarLogger.Debugf("=============err := %v", err) + if err != nil { + globals.SugarLogger.Debugf("=============err := %v", err) + } return failedFoodList, err }