文档
测试

02、获取打分最多的商品

GET
http://localhost:8080/product/rate

接口描述

获取打分最多的商品

请求参数

参数名
类型
描述
必填
num
int
返回推荐结果的数量
必填

响应参数

参数名
类型
描述
必填
code
string
200成功,其他业务码失败
必填
msg
string
提示消息
必填
data
array
数据列表
必填
productId
int
示例:8195
必填
name
string
示例:Kingston 金士顿 Class4 32G TF卡(micro SD)手机存储卡
必填
imgUrl
string
示例:https://images-cn-4.ssl-images-amazon.com/images/I/41zUS3RjvRL._SY300_QL70_.jpg
必填
score
float
示例:4.407433881343817
必填
categories
string
示例:存储设备|存储卡|电脑/办公
必填
tags
string
示例:存储卡|金士顿|SD卡|容量挺大的|速度快|好用
必填

响应示例

``` { "code": "200", "msg": "suceess", "data": [ { "productId": 8195, "name": "Kingston 金士顿 Class4 32G TF卡(micro SD)手机存储卡", "imgUrl": "https://images-cn-4.ssl-images-amazon.com/images/I/41zUS3RjvRL._SY300_QL70_.jpg", "score": 4.407433881343817, "categories": "存储设备|存储卡|电脑/办公", "tags": "存储卡|金士顿|SD卡|容量挺大的|速度快|好用" }, { "productId": 13316, "name": "Kingston 金士顿 DataTraveler 101 G2 32GB 优盘", "imgUrl": "https://images-cn-4.ssl-images-amazon.com/images/I/41nIbzEKQCL._SY300_QL70_.jpg", "score": 4.14612676056338, "categories": "存储设备|U盘|电脑/办公", "tags": "优盘|金士顿|好用|容量挺大的|速度快" }, { "productId": 14103, "name": "SanDisk 闪迪 microSDXC Class10 64GB至尊高速移动存储卡 UHS-1制式 读写速度最高可达30MB/s", "imgUrl": "https://images-cn-4.ssl-images-amazon.com/images/I/41mU1iHKkkL._SX300_QL70_.jpg", "score": 4.519975786924939, "categories": "存储设备|存储卡|电脑/办公", "tags": "存储卡|SD卡|容量挺大的|闪迪|速度快|好用" }, { "productId": 57272, "name": "因为痛,所以叫青春:写给独自站在人生路口的你(精装版)", "imgUrl": "https://images-cn-4.ssl-images-amazon.com/images/I/51gKCDBk5WL._SY344_BO1,204,203,200_QL70_.jpg", "score": 4.397545357524013, "categories": "青春文学|文学艺术|图书音像", "tags": "好看|内容丰富|书|青春文学|小说|励志|不贵|内容不错" }, { "productId": 109236, "name": "因为痛,所以叫青春:写给独自站在人生路口的你", "imgUrl": "https://images-cn-4.ssl-images-amazon.com/images/I/51cQTMsG1%2BL._SY445_QL70_.jpg", "score": 4.429539295392954, "categories": "青春文学|文学艺术|图书音像", "tags": "青春文学|书|内容不错|好看|鸡汤" }, { "productId": 145218, "name": "好妈妈胜过好老师", "imgUrl": "https://images-cn-4.ssl-images-amazon.com/images/I/41DBneaGRwL._SY344_BO1,204,203,200_QL70_.jpg", "score": 4.648459383753502, "categories": "亲子/家教|生活类图书|图书音像", "tags": "书|教育类|写的很好|尹建莉老师的书真好|很有启发|到货速度快|有破损" }, { "productId": 183418, "name": "谁的青春不迷茫", "imgUrl": "https://images-cn-4.ssl-images-amazon.com/images/I/41TEclaV%2BfL._SY344_BO1,204,203,200_QL70_.jpg", "score": 4.2701212789415655, "categories": "图书音像|少儿|少儿/教育图书", "tags": "书|少儿图书|鸡汤|呵呵|励志|垃圾" }, { "productId": 184282, "name": "追风筝的人", "imgUrl": "https://images-cn-4.ssl-images-amazon.com/images/I/41Zu6wuZ4VL._SY344_BO1,204,203,200_QL70_.jpg", "score": 4.606116774791474, "categories": "小说|文学艺术|图书音像", "tags": "书|小说|文学|很感动|哭的稀里哗啦|好看|到货速度快|内容挺好|内容不错" }, { "productId": 286997, "name": "千纤草黄瓜水500ml", "imgUrl": "https://images-cn-4.ssl-images-amazon.com/images/I/31i7lIchHBL._SY300_QL70_.jpg", "score": 4.341579731743666, "categories": "面部护理|美妆个护|化妆水/爽肤水", "tags": "化妆品|面部护理|千纤草|到货速度快|用起来很舒服" }, { "productId": 473113, "name": "活着", "imgUrl": "https://images-cn-4.ssl-images-amazon.com/images/I/51UETWQschL._SY344_BO1,204,203,200_QL70_.jpg", "score": 4.641025641025641, "categories": "音像|图书音像|有声读物", "tags": "书|小说|余华|很感人|文学|看的很压抑|写的很好" } ] } ```