1
This commit is contained in:
@@ -20,13 +20,13 @@ func init() {
|
||||
baseapi.Init(sugarLogger)
|
||||
|
||||
// 菜市
|
||||
api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
|
||||
//api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
|
||||
|
||||
// 果园
|
||||
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
|
||||
|
||||
//商超
|
||||
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_nngsVP37s-HXY86xe85H7Q") //token_n4TwqCntWWuvQwAawzxC0w
|
||||
api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_nngsVP37s-HXY86xe85H7Q") //token_n4TwqCntWWuvQwAawzxC0w
|
||||
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_r36FEse6_ywebQI65FNNWA") //token_n4TwqCntWWuvQwAawzxC0w
|
||||
cookieStr := `
|
||||
acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
|
||||
|
||||
@@ -203,12 +203,27 @@ func TestErrList(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRetailBatchInitData(t *testing.T) {
|
||||
failedFoods, err := api.RetailBatchInitData(utils.GetUUID(), testPoiCode, []map[string]interface{}{
|
||||
failedFoods, err := api.RetailBatchInitData(utils.GetUUID(), "19120530", []map[string]interface{}{
|
||||
map[string]interface{}{
|
||||
"app_food_code": "23841",
|
||||
//"app_food_code": "",
|
||||
//"category_code": "",
|
||||
//"category_name": "粮油调味",
|
||||
//"common_attr_value": "[{\"attr_id\":1200000088,\"attr_name\":\"品牌\",\"valueList\":[{\"value_id\":0,\"value\":\"其他\"}]},{\"attr_id\":1200000210,\"attr_name\":\"商品类别\",\"valueList\":[{\"value_id\":1300025227,\"value\":\"萝卜丝\"}]}]",
|
||||
//"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",
|
||||
//"picture_contents": "",
|
||||
//"price": 4.5,
|
||||
//"sequence": -117,
|
||||
//"skus": "[{\"available_times\":{\"friday\":\"\",\"monday\":\"\",\"saturday\":\"\",\"sunday\":\"\",\"thursday\":\"\",\"tuesday\":\"\",\"wednesday\":\"\"},\"box_num\":\"0\",\"box_price\":\"0.0\",\"isSellFlag\":1,\"ladder_box_num\":\"\",\"ladder_box_price\":\"\",\"limit_open_sync_stock_now\":false,\"location_code\":\"\",\"min_order_count\":\"1\",\"price\":\"4.5\",\"sku_id\":\"\",\"spec\":\"52g*1袋\",\"stock\":\"9999\",\"unit\":\"\",\"upc\":\"6926896703303\",\"weight\":\"52\",\"weight_unit\":\"克(g)\"}]",
|
||||
//"tag_id": 200005035,
|
||||
//"unit": "g",
|
||||
"app_food_code": "",
|
||||
"box_num": 0,
|
||||
"box_price": 0,
|
||||
"category_name": "南北干货",
|
||||
"category_name": "粮油调味",
|
||||
"description": "",
|
||||
"is_sold_out": 0,
|
||||
"min_order_count": 1,
|
||||
@@ -227,29 +242,6 @@ func TestRetailBatchInitData(t *testing.T) {
|
||||
// "tag_id": "200000380",
|
||||
"unit": "份",
|
||||
},
|
||||
map[string]interface{}{
|
||||
"app_food_code": "23840",
|
||||
"box_num": 0,
|
||||
"box_price": 0,
|
||||
"category_name": "南北干货",
|
||||
"description": "",
|
||||
"is_sold_out": 0,
|
||||
"min_order_count": 1,
|
||||
"name": "干腐竹约150g/份",
|
||||
"picture": "http://image.jxc4.com/5f7fba025fc9348796039423c48ac3f5.jpg",
|
||||
"price": 1000,
|
||||
"skus": []map[string]interface{}{
|
||||
map[string]interface{}{
|
||||
"price": 1000,
|
||||
"sku_id": "23840",
|
||||
"spec": "150g",
|
||||
"stock": "*",
|
||||
"upc": "",
|
||||
},
|
||||
},
|
||||
"tag_id": "200000380",
|
||||
"unit": "份",
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user