Open jacobfan opened 10 years ago
我去线上自己设置了一个推荐类型,返回的结果是正常的。 具体数据如下:
curl 'poco.ehaoyao.com/api/v1.6/private/recommender/custom_lists' -H 'Content-Type: application/json' -d '{ "api_key": "","item_ids": ["639", "2455"], "type": "test-custom-list", "action": "get_recommender_items"}'
curl 'poco.ehaoyao.com/api/v1.6/public/recommender/?api_key=&type=CustomList&custom_type=hwg_v1_australia_rmt&user_id=u1&amount=10' | python -mjson.tool | grep '"item_id'
"item_id": "639",
"item_id": "2455",
"item_id": "1365",
"item_id": "2011",
"item_id": "7127",
"item_id": "13040",
"item_id": "10339",
"item_id": "15474",
"item_id": "16187",
"item_id": "17470",
手工设置的两个商品,均排在了最前;数量不足的, 使用了热门商品进行补充
结果如下:
curl 'poco.ehaoyao.com/api/v1.6/public/recommender/?api_key=&type=CustomList&custom_type=hwg_v1_australia_rmtj&user_id=u1&amount=10' | python -mjson.tool | grep '"item_id' %
"item_id": "19955",
"item_id": "19954",
"item_id": "1365",
"item_id": "2011",
"item_id": "7127",
"item_id": "13040",
"item_id": "10339",
"item_id": "15474",
"item_id": "16187",
"item_id": "2455",
客户设置的两个商品,也拍到了最前,剩余用热门商品补充
curl 'poco.ehaoyao.com/api/v1.6/public/recommender/?api_key=&type=CustomList&custom_type=hwg_v1_australia_rmt&user_id=u1&amount=10' | python -mjson.tool | grep '"item_id'
"item_id": "1365",
"item_id": "2011",
"item_id": "7127",
"item_id": "13040",
"item_id": "10339",
"item_id": "15474",
"item_id": "16187",
"item_id": "2455",
"item_id": "639",
"item_id": "17470",
客户反映:
读取的方式:
客户传送这个请求设置的custom list: { "action": "set_recommender_items", "api_key": "prod-b02c65ef", "display_name": "11", "item_ids": [ "19955", "19954" ], "type": "hwg_v1_australia_rmtj" }