|
|
###搜索服务地址:
|
|
|
|
|
|
测试环境: 192.168.10.64:8080/yohosearch
|
|
|
|
|
|
预生产环境:
|
|
|
|
|
|
阿里云 外网地址 182.92.99.119:8080/yohosearch
|
|
|
内网IP:10.171.116.186:8080/yohosearch
|
|
|
|
|
|
生产环境:x.yohobuy.com/yohosearch
|
|
|
|
|
|
|
|
|
#1. 搜索商品接口
|
|
|
##1.1 请求
|
|
|
1.1.1 URL格式
|
|
|
|
|
|
[link text]:http://{host}:{port}/yohosearch/search.json?query={searchquery}&order={orderby hot,new}&……
|
|
|
|
|
|
host:服务器地址;
|
|
|
|
|
|
port:应用服务器端口;
|
|
|
|
|
|
yohosearch:服务实例名;
|
|
|
|
|
|
search:查询接口名称
|
|
|
|
|
|
其他参数见1.1.2
|
|
|
|
|
|
1.1.2
|
|
|
|名称|说明|可空|
|
|
|
|
|
|
|----|----|-----|
|
|
|
|
|
|
|query| 关键字| 是|
|
|
|
|
|
|
|order|排序类型
|
|
|
格式:排序字段名:排序方式,如按销量正序排“sales_num:asc”
|
|
|
多重排序以逗号分隔,如“order=sales_num:asc, shelve_time:desc”
|
|
|
order=discount_score:desc折扣专场score排序
|
|
|
|是|
|
|
|
|
|
|
|page|页数
|
|
|
默认为1
|
|
|
|是|
|
|
|
|
|
|
|viewNum|每页记录数参数说明
|
|
|
默认为10
|
|
|
|是|
|
|
|
|
|
|
|brand|品牌ID|是|
|
|
|
|
|
|
||查多个品牌以逗号分隔||
|
|
|
|
|
|
|msort| 产品大分类ID
|
|
|
查多个大类以逗号分隔| 是
|
|
|
|
|
|
|
|
|
|
|misort |产品中分类ID
|
|
|
查多个中类以逗号分隔| 是
|
|
|
|
|
|
|
|
|
|
|sort |查询小分类ID
|
|
|
查多个小类以逗号分隔| 是
|
|
|
|
|
|
|
|
|
|
|gender| 性别
|
|
|
1-男
|
|
|
2-女
|
|
|
3-通用
|
|
|
查多个性别以逗号分隔| 是
|
|
|
|
|
|
|
|
|
|
|price| 价格区间
|
|
|
起始价格以逗号分隔,如查询300-600元“price=300,600”| 是
|
|
|
|
|
|
|
|
|
|
|color |颜色ID
|
|
|
查多个颜色以逗号分隔| 是
|
|
|
|
|
|
|
|
|
|
|size |尺码ID
|
|
|
查多个尺码以逗号分隔| 是
|
|
|
|
|
|
|
|
|
|
|style| 风格ID
|
|
|
查多个风格以逗号分隔| 是
|
|
|
|
|
|
|
|
|
|
|parameter_xxx| 属性类型ID与值ID
|
|
|
参数名称格式:parameter_{属性类型ID}={属性值ID},如查询厚度为中“parameter_875=4801”| 是
|
|
|
|
|
|
|
|
|
|
|stocknumber| 库存量
|
|
|
如“stocknumber=2”,则过滤出库存量>=2的商品| 是
|
|
|
|
|
|
|
|
|
|
|shelve_time| 时间区间
|
|
|
起始时间以逗号分隔,如查询20150101-20150106 “shelve_time =1420041600,1420473600”| 是
|
|
|
|
|
|
|
|
|
|
|first_shelve_time| 时间区间
|
|
|
起始时间以逗号分隔,如查询20150101-20150106 “first_shelve_time =1420041600,1420473600” |是
|
|
|
|
|
|
|
|
|
|
|needFilter| 需要返回过滤集合
|
|
|
needFilter=1 |是
|
|
|
|
|
|
|
|
|
|
|specialoffer| 特价类型| 是|
|
|
|
|
|
|
|sales |是否销售“N”或“Y” |是|
|
|
|
|
|
|
|promotion| 促销id | 是|
|
|
|
|
|
|
|vdt| Vip折扣类型 |是|
|
|
|
|
|
|
|p_d| 促销折扣浮点值如0.7 |是|
|
|
|
|
|
|
|attribute| 商品属性 1正常商品 2赠品 |是|
|
|
|
|
|
|
|limited 是否限量 “N”或“Y”| 是|
|
|
|
|
|
|
|new| 是否新品“N”或“Y”| 是|
|
|
|
|
|
|
|status| 是否上架 1 或 2 |是|
|
|
|
|
|
|
|sell_channels| 销售平台 |是|
|
|
|
|
|
|
|p_d_int| 促销折扣 int型如7 |是|
|
|
|
|
|
|
|act_temp| 活动模板| 是|
|
|
|
|
|
|
|act_rec| 活动模板是否推荐| 是|
|
|
|
|
|
|
|act_status| 活动模板商品状态| 是|
|
|
|
|
|
|
|attribute_not|过滤商品属性,attribute_not=2过滤掉赠品| 是|
|
|
|
|
|
|
|not_*| not_字段名,过滤字段如:not_productSkn=50019303
|
|
|
多个值以逗号分隔| 是
|
|
|
|
|
|
|
|
|
|
|breaking| breaking=1断码商品| 是|
|
|
|
|
|
|
|filter_poolId| filter_poolId=1,2 折扣专场的商品池id,可以传单个,也可以传多个 |是|
|
|
|
|
|
|
|outlets| outlets=2非奥莱商品
|
|
|
outlets=1 奥莱商品 |是
|
|
|
|
|
|
|
|
|
|
|
|
|
|highlight| Highlight=1检索高亮 —没有query参数不要加该参数 |是|
|
|
|
|
|
|
#1.2 响应
|
|
|
|
|
|
1.2.1 报文格式
|
|
|
|
|
|
响应报文为json格式
|
|
|
|
|
|
#成功:
|
|
|
|
|
|
http://192.168.10.64:8080/yohosearch/search.json?query=水滴&viewNum=2&msort=3&color=2
|
|
|
|
|
|
|
|
|
{
|
|
|
code: 200
|
|
|
message: "Search List.",
|
|
|
data: {
|
|
|
product_list: [
|
|
|
{
|
|
|
cn_alphabet: "MYGESMARTMSPT14Q401CA4XiuXianChangKu",
|
|
|
product_name: "MYGESMART 数码水滴束脚裤",
|
|
|
brand_name: "MYGESMART",
|
|
|
brand_id: 257,
|
|
|
market_price: 339,
|
|
|
vip_price: 0,
|
|
|
sales_price: 269,
|
|
|
vip_discount_type: 3,
|
|
|
product_id: 117939,
|
|
|
product_skn: 51073465,
|
|
|
is_new: "Y",
|
|
|
is_discount: "N",
|
|
|
is_advance: "N",
|
|
|
is_soon_sold_out: "N",
|
|
|
is_limited: "N",
|
|
|
is_yohood: "N",
|
|
|
goods_list: [
|
|
|
{
|
|
|
color_name: "黑色",
|
|
|
color_id: "2",
|
|
|
color_code: "333333",
|
|
|
color_value: "",
|
|
|
images_url: "/2014/11/04/07/02e3d09b6cdb566c1b3c1b01a9b760ddb4.jpg",
|
|
|
product_skc: "184239",
|
|
|
is_default: "N"
|
|
|
}
|
|
|
],
|
|
|
default_images: null,
|
|
|
yohood_id:null,
|
|
|
sales_phrase:””
|
|
|
},
|
|
|
{
|
|
|
cn_alphabet: "KORAKUBLUE600VBShuiDiDingZhiMiCaiPinJieXinBianFengYuanJiangChiErDanNing",
|
|
|
product_name: "Korakublue 水滴定制迷彩拼接新边锋原浆赤耳丹宁长裤",
|
|
|
brand_name: "Korakublue",
|
|
|
brand_id: 196,
|
|
|
market_price: 588,
|
|
|
vip_price: 0,
|
|
|
sales_price: 521,
|
|
|
vip_discount_type: 1,
|
|
|
product_id: 79030,
|
|
|
product_skn: 51050314,
|
|
|
is_new: "N",
|
|
|
is_discount: "N",
|
|
|
is_advance: "N",
|
|
|
is_soon_sold_out: "N",
|
|
|
is_limited: "Y",
|
|
|
is_yohood: "N",
|
|
|
goods_list: [
|
|
|
{
|
|
|
color_name: "黑色",
|
|
|
color_id: "2",
|
|
|
color_code: "333333",
|
|
|
color_value: "",
|
|
|
images_url: "/2014/06/10/02/013f98655c85049a263cf35b825707b1d1.jpg",
|
|
|
product_skc: "155247",
|
|
|
is_default: "N"
|
|
|
}
|
|
|
],
|
|
|
default_images: null
|
|
|
yohood_id:null,
|
|
|
sales_phrase:””
|
|
|
}
|
|
|
],
|
|
|
page_total: 2,
|
|
|
total: 3,
|
|
|
page: 1,
|
|
|
filter: {
|
|
|
size: [
|
|
|
{
|
|
|
size_id: 211,
|
|
|
size_name: "XL"
|
|
|
},
|
|
|
{
|
|
|
size_id: 216,
|
|
|
size_name: "XXL"
|
|
|
},
|
|
|
{
|
|
|
size_id: 201,
|
|
|
size_name: "L"
|
|
|
},
|
|
|
{
|
|
|
size_id: 203,
|
|
|
size_name: "M"
|
|
|
},
|
|
|
{
|
|
|
size_id: 207,
|
|
|
size_name: "S"
|
|
|
}
|
|
|
],
|
|
|
color: [
|
|
|
{
|
|
|
color_id: 2,
|
|
|
color_value: "",
|
|
|
color_name: "黑色",
|
|
|
color_code: "333333"
|
|
|
}
|
|
|
],
|
|
|
style: [
|
|
|
{
|
|
|
style_name: "街头",
|
|
|
style_id: 991
|
|
|
},
|
|
|
{
|
|
|
style_name: "美式",
|
|
|
style_id: 993
|
|
|
},
|
|
|
{
|
|
|
style_name: "趣味",
|
|
|
style_id: 992
|
|
|
}
|
|
|
],
|
|
|
parameter_61: {
|
|
|
standard_id: "61",
|
|
|
sub: [
|
|
|
{
|
|
|
standard_name: "丹宁",
|
|
|
standard_id: "423"
|
|
|
}
|
|
|
],
|
|
|
standard_name: "面料材质"
|
|
|
},
|
|
|
parameter_890: {
|
|
|
standard_id: "890",
|
|
|
sub: [
|
|
|
{
|
|
|
standard_name: "长裤",
|
|
|
standard_id: "4865"
|
|
|
}
|
|
|
],
|
|
|
standard_name: "裤长"
|
|
|
},
|
|
|
parameter_891: {
|
|
|
standard_id: "891",
|
|
|
sub: [
|
|
|
{
|
|
|
standard_name: "正常",
|
|
|
standard_id: "4867"
|
|
|
}
|
|
|
],
|
|
|
standard_name: "腰型"
|
|
|
},
|
|
|
parameter_892: {
|
|
|
standard_id: "892",
|
|
|
sub: [
|
|
|
{
|
|
|
standard_name: "正常",
|
|
|
standard_id: "4871"
|
|
|
}
|
|
|
],
|
|
|
standard_name: "版型"
|
|
|
},
|
|
|
parameter_893: {
|
|
|
standard_id: "893",
|
|
|
sub: [
|
|
|
{
|
|
|
standard_name: "中",
|
|
|
standard_id: "4874"
|
|
|
}
|
|
|
],
|
|
|
standard_name: "厚度"
|
|
|
},
|
|
|
price: {
|
|
|
0,109: "¥0-109",
|
|
|
110,229: "¥110-229",
|
|
|
230,799: "¥230-799",
|
|
|
800,99999: "¥799以上"
|
|
|
},
|
|
|
gender: {
|
|
|
1,
|
|
|
3: "BOYS"
|
|
|
},
|
|
|
brand: [
|
|
|
{
|
|
|
id: 257,
|
|
|
brand_alif: "M",
|
|
|
brand_domain: "mygesmart",
|
|
|
is_hot: "Y",
|
|
|
brand_ico: "/2014/01/27/11/01d9dbee4c83e9122bd1fc363ceb85e484.jpg",
|
|
|
brand_name: "MYGESMART"
|
|
|
},
|
|
|
{
|
|
|
id: 196,
|
|
|
brand_alif: "K",
|
|
|
brand_domain: "korakublue",
|
|
|
is_hot: "N",
|
|
|
brand_ico: "/2013/10/15/13/01225f1b70fb0ea3a8c543ed7c968f9b17.jpg",
|
|
|
brand_name: "Korakublue"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
#失败:
|
|
|
|
|
|
http://192.168.10.64:8080/yohosearch/search.json?query=中国中关村&needFilter=1
|
|
|
|
|
|
|名称|说明|
|
|
|
|
|
|
|----------- |:--------- :|
|
|
|
|
|
|
|code| 状态码
|
|
|
200-成功;400-异常
|
|
|
|
|
|
|
|
|
|
|message| 报文类型
|
|
|
如,搜索“Search List.”
|
|
|
|
|
|
|
|
|
|
|data| 数据正文|
|
|
|
|
|
|
|product_list| 商品列表|
|
|
|
|
|
|
|page_total| 总页数|
|
|
|
|
|
|
|total| 总条数|
|
|
|
|
|
|
|page 当前页|
|
|
|
|
|
|
|filter| 过滤集合|
|
|
|
|
|
|
|cn_alphabet |中文拼音|
|
|
|
|
|
|
|product_name| 产品名称|
|
|
|
|
|
|
|brand_name |品牌名称|
|
|
|
|
|
|
|brand_id |品牌ID|
|
|
|
|
|
|
|market_price |市场价|
|
|
|
|
|
|
|vip_price| VIP价|
|
|
|
|
|
|
|sales_price |销售价|
|
|
|
|
|
|
|vip_discount_type |VIP折扣类型|
|
|
|
|
|
|
|product_id| 产品ID|
|
|
|
|
|
|
|product_skn |skn码|
|
|
|
|
|
|
|is_new |是否新品|
|
|
|
|
|
|
|is_discount |是否折扣|
|
|
|
|
|
|
|is_advance |
|
|
|
|
|
|
|is_soon_sold_out |即将售罄
|
|
|
|
|
|
|is_limited| 是否限量
|
|
|
|
|
|
|is_yohood| 是否YOHOOD
|
|
|
|
|
|
|default_images| 默认图片
|
|
|
|
|
|
|goods_list| skc列表
|
|
|
|
|
|
|color_name |颜色名称
|
|
|
|
|
|
|color_id |颜色ID
|
|
|
|
|
|
|color_code |颜色代码
|
|
|
|
|
|
|color_value |颜色值
|
|
|
|
|
|
|images_url |颜色图片
|
|
|
|
|
|
|product_skc |skc码
|
|
|
|
|
|
|is_default| 是否默认图片
|
|
|
|
|
|
|discount |折扣
|
|
|
|
|
|
|group_sort |品类
|
|
|
|
|
|
|sort_name |大/中品类名称
|
|
|
|
|
|
|sort_id |大/中品类ID
|
|
|
|
|
|
|sub |中类列表
|
|
|
|
|
|
|size |尺码
|
|
|
|
|
|
|size_name |尺码名称
|
|
|
|
|
|
|size_id |尺码ID
|
|
|
|
|
|
|color |颜色
|
|
|
|
|
|
|priceRange |价格区间
|
|
|
|
|
|
|gender |性别
|
|
|
|
|
|
|brand |品牌
|
|
|
|
|
|
|id |品牌ID
|
|
|
|
|
|
|brand_name| 品牌名称
|
|
|
|
|
|
|brand_domain |品牌域名
|
|
|
|
|
|
|brand_ico |品牌商标图片
|
|
|
|
|
|
|is_hot| 是否热卖
|
|
|
|
|
|
|brand_alif |品牌首字母
|
|
|
|
|
|
#2. 商品分类接口
|
|
|
|
|
|
2.1 请求
|
|
|
|
|
|
2.1.1 URL格式
|
|
|
|
|
|
http://{host}:{port}/yohosearch/sortgroup.json?query={searchquery}&needAllSort=1&needSmallSort=1
|
|
|
|
|
|
host:服务器地址;
|
|
|
|
|
|
port:应用服务器端口;
|
|
|
|
|
|
yohosearch:服务实例名;
|
|
|
|
|
|
sortgroup:分类接口名称
|
|
|
|
|
|
其他参数见2.1.2
|
|
|
|
|
|
|
|
|
2.1.2 参数说明
|
|
|
|
|
|
名称 说明 可空
|
|
|
|
|
|
|query |关键字 |是|
|
|
|
|
|
|
needAllSort| 为1时返回全部分类 是
|
|
|
|
|
|
needSmallSort| 为1时返回小分类 是
|
|
|
|
|
|
brand| 品牌ID
|
|
|
查多个品牌以逗号分隔 是
|
|
|
|
|
|
msort| 产品大分类ID
|
|
|
|
|
|
查多个大类以逗号分隔 是
|
|
|
|
|
|
misort| 产品中分类ID
|
|
|
|
|
|
查多个中类以逗号分隔 是
|
|
|
|
|
|
sort| 查询小分类ID
|
|
|
查多个小类以逗号分隔 是
|
|
|
|
|
|
gender| 性别
|
|
|
1-男
|
|
|
2-女
|
|
|
3-通用
|
|
|
查多个性别以逗号分隔 是
|
|
|
|
|
|
price| 价格区间
|
|
|
起始价格以逗号分隔,如查询300-600元“price=300,600” 是
|
|
|
|
|
|
color| 颜色ID
|
|
|
查多个颜色以逗号分隔 是
|
|
|
|
|
|
size 尺码ID
|
|
|
查多个尺码以逗号分隔 是
|
|
|
|
|
|
style 风格ID
|
|
|
查多个风格以逗号分隔 是
|
|
|
|
|
|
parameter_xxx 属性类型ID与值ID
|
|
|
参数名称格式:parameter_{属性类型ID}={属性值ID},如查询厚度为中“parameter_875=4801” 是
|
|
|
|
|
|
stocknumber 库存量
|
|
|
如“stocknumber=2”,则过滤出库存量>=2的商品 是
|
|
|
|
|
|
shelve_time 时间区间
|
|
|
起始时间以逗号分隔,如查询20150101-20150106 “shelve_time =1420041600,1420473600” 是
|
|
|
|
|
|
first_shelve_time 时间区间
|
|
|
起始时间以逗号分隔,如查询20150101-20150106 “first_shelve_time =1420041600,1420473600” 是
|
|
|
|
|
|
specialoffer 特价类型 是
|
|
|
sales 是否销售 是
|
|
|
|
|
|
promotion 是否为促销品 是
|
|
|
|
|
|
vdt Vip折扣类型 是
|
|
|
|
|
|
p_d 促销折扣浮点值如0.7 是
|
|
|
|
|
|
attribute 商品属性 1正常商品 2赠品 是
|
|
|
|
|
|
limited 是否限量 “N”或“Y” 是
|
|
|
|
|
|
new 是否新品“N”或“Y” 是
|
|
|
|
|
|
status 是否上架 1 或 2 是
|
|
|
|
|
|
sell_channels 销售平台 是
|
|
|
|
|
|
p_d_int 促销折扣 int型如7 是
|
|
|
act_temp 活动模板 是
|
|
|
|
|
|
act_rec 活动模板是否推荐 是
|
|
|
|
|
|
act_status 活动模板商品状态 是
|
|
|
|
|
|
attribute_not 过滤商品属性,attribute_not=2过滤掉赠品 是
|
|
|
|
|
|
not_* not_字段名,过滤字段 是
|
|
|
|
|
|
#2.2 响应
|
|
|
|
|
|
2.2.1 报文格式
|
|
|
|
|
|
响应报文为json格式
|
|
|
|
|
|
成功:
|
|
|
|
|
|
http://192.168.10.64:8080/yohosearch/sortgroup.json?query=水滴&msort=3&color=2
|
|
|
|
|
|
{
|
|
|
"message":"sort List.",
|
|
|
"code":200,
|
|
|
"data":{
|
|
|
"sort":[
|
|
|
{
|
|
|
"sort_id":"3",
|
|
|
"sort_name":"裤装",
|
|
|
"order_by":"90",
|
|
|
"count":4,
|
|
|
"sub":[
|
|
|
{
|
|
|
"sort_id":"26",
|
|
|
"sort_name":"休闲裤",
|
|
|
"order_by":"20",
|
|
|
"count":1
|
|
|
},
|
|
|
{
|
|
|
"sort_id":"27",
|
|
|
"sort_name":"牛仔裤",
|
|
|
"order_by":"19",
|
|
|
"count":3
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
#2.2.2 参数说明
|
|
|
|
|
|
名称 说明
|
|
|
|
|
|
|code |状态码
|
|
|
|
|
|
200-成功;400-异常
|
|
|
|
|
|
message 报文类型
|
|
|
|
|
|
如,“Sort List.”
|
|
|
data 数据正文
|
|
|
sort 分类
|
|
|
|
|
|
sub 子分类
|
|
|
|
|
|
sort_id 分类id
|
|
|
|
|
|
sort_name 分类名称
|
|
|
|
|
|
order_by 排序
|
|
|
|
|
|
count 商品数量
|
|
|
|
|
|
|
|
|
#3. 搜索建议接口
|
|
|
3.1 请求
|
|
|
|
|
|
3.1.1 URL格式
|
|
|
|
|
|
http://{host}:{port}/yohosearch/suggest.json?query={searchquery}&size=5
|
|
|
|
|
|
host:服务器地址;
|
|
|
|
|
|
port:应用服务器端口;
|
|
|
|
|
|
yohosearch:服务实例名;
|
|
|
|
|
|
suggest:查询接口名称
|
|
|
|
|
|
其他参数见3.1.2
|
|
|
|
|
|
3.1.2 参数说明
|
|
|
|
|
|
|
|
|
|名称 |说明 |可空
|
|
|
|
|
|
query 关键字 否
|
|
|
|
|
|
size 返回词条个数
|
|
|
|
|
|
默认5个 是
|
|
|
|
|
|
|
|
|
#3.2 响应
|
|
|
|
|
|
3.2.1 报文格式
|
|
|
|
|
|
响应报文为json格式
|
|
|
|
|
|
成功:
|
|
|
|
|
|
http://192.168.10.64:8080/yohosearch/suggest.json?query=迷彩&size=7
|
|
|
|
|
|
{
|
|
|
code:200
|
|
|
suggest:{
|
|
|
items:[
|
|
|
{"item":"迷彩街头","frequency":311},
|
|
|
{"item":"迷彩军事","frequency":90},
|
|
|
{"item":"迷彩美式","frequency":84},
|
|
|
{"item":"迷彩拼接","frequency":75},
|
|
|
{"item":"迷彩t","frequency":63},
|
|
|
{"item":"迷彩短裤","frequency":61},
|
|
|
{"item":"迷彩t恤","frequency":59}]
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
查询为空:
|
|
|
|
|
|
{
|
|
|
code:200
|
|
|
suggest:{
|
|
|
items:[]
|
|
|
}
|
|
|
}
|
|
|
|
|
|
#3.2.2 参数说明
|
|
|
|
|
|
名称 说明
|
|
|
|
|
|
suggest 报文头
|
|
|
|
|
|
items 结果集
|
|
|
|
|
|
item 词条名
|
|
|
|
|
|
frequency 词频
|
|
|
|
|
|
4.1 请求
|
|
|
|
|
|
4.1.1 URL格式
|
|
|
|
|
|
http://{host}:{port}/yohosearch/storehouse/search.json?query={searchquery}&viewNum=5&page=1&status=1&category=3
|
|
|
|
|
|
host:服务器地址;
|
|
|
|
|
|
port:应用服务器端口;
|
|
|
|
|
|
yohosearch:服务实例名;
|
|
|
|
|
|
其他参数见4.1.2
|
|
|
|
|
|
|
|
|
4.1.2 参数说明
|
|
|
|
|
|
名称 说明 可空
|
|
|
|
|
|
query 关键字 否
|
|
|
|
|
|
viewNum 返回个数 默认:10 是
|
|
|
|
|
|
page 第几页 默认:1 是
|
|
|
|
|
|
status 状态 是
|
|
|
|
|
|
category 分类 是
|
|
|
|
|
|
order 排序:order=edit_time:desc 按照编辑时间倒序排列 是
|
|
|
|
|
|
|
|
|
4.2 响应
|
|
|
|
|
|
4.2.1 报文格式
|
|
|
|
|
|
响应报文为json格式
|
|
|
|
|
|
成功:
|
|
|
|
|
|
http://192.168.10.64:8080/yohosearch/storehouse/search.json?query=Life%20After%20Life&status=1&category=3
|
|
|
|
|
|
|
|
|
{
|
|
|
"message": "trends info",
|
|
|
"data": [
|
|
|
{
|
|
|
"content": "<p style=\"text-align: center;\">\r\n\t<img border=\"0\" src=\"http://img01.static.yohobuy.com/cms/2015/03/16/14/016d065ac71ab9e295b4eecd3ae569f1b7.jpg\" /></p>\r\n<p>\r\n\t<span style=\"font-size:14px;\"> Alinederose推出全新2015年春季系列,灵感来源于趣味,生机黯然的春天,打造快乐至上、趣味无敌的时尚精神。春季系列运用趣味印花、条纹、卡通元素,营造出轻松的少女嬉皮风。该系列用低调而不简单的款式为主,在实用的基础上增加衣物的趣味感。整个系列在面料的质感方面,运用了梭织、空气层、棉麻等一系列精良触感的面料,提升了整个系列服装的level。<br />\r\n\t 也更加体现了alinederose在设计衣服的初始想法,更以趣味的角度去做自己穿的衣服,体现自己的时尚,为穿衣态度赋予了新定义,也彰显了自我的新主张。</span><br />\r\n\t </p>\r\n<p style=\"text-align: center;\">\r\n\t<img border=\"0\" src=\"http://img02.static.yohobuy.com/cms/2015/03/16/14/022f26eaf71e8c9e403f9dc589abd34b83.jpg\" /></p>\r\n<p style=\"text-align: center;\">\r\n\t<img border=\"0\" src=\"http://img01.static.yohobuy.com/cms/2015/03/16/14/01dc31fa448ee6afdabb4cf9c733ce8107.jpg\" /></p>\r\n<p style=\"text-align: center;\">\r\n\t<span _fck_bookmark=\"1\" style=\"display: none;\"> </span><img border=\"0\" src=\"http://img02.static.yohobuy.com/cms/2015/03/16/14/026dbacc22b32215debe4af7681703a4c7.jpg\" /><br />\r\n\t </p>\r\n<p style=\"text-align: center;\">\r\n\t<span _fck_bookmark=\"1\" style=\"display: none;\"> </span><img border=\"0\" src=\"http://img01.static.yohobuy.com/cms/2015/03/16/14/0183cee849a1a2fb441489008c503a9d1f.jpg\" /><br />\r\n\t </p>\r\n<p>\r\n\t<strong style=\"color: rgb(51, 51, 51); font-family: arial, 'Microsoft YaHei'; font-size: 14px; line-height: 20px;\"><span style=\"font-size: 18px;\"><strong style=\"font-size: 14px; line-height: 18px;\"><strong><span style=\"font-size: 18px;\">商品信息:</span></strong></strong></span></strong><br />\r\n\t<br style=\"color: rgb(51, 51, 51); font-family: arial, 'Microsoft YaHei'; font-size: 14px; line-height: 18px;\" />\r\n\t<span style=\"color: rgb(51, 51, 51); font-family: arial, 'Microsoft YaHei'; line-height: 20px; font-size: 18px;\"><span style=\"line-height: 18px;\"><span style=\"font-size: 14px;\">品牌:<a href=\"http://alinederose.yohobuy.com/?gender=2,3\"><span style=\"background-color: rgb(255, 255, 255);\">Aline de rose</span></a></span></span></span><br />\r\n\t<br />\r\n\t购买链接:<a href=\"http://alinederose.yohobuy.com/?gender=2,3\" target=\"_blank\">点击购买</a></p>\r\n<p style=\"text-align: center;\">\r\n\t<br />\r\n\t<span _fck_bookmark=\"1\" style=\"display: none;\"> </span></p>\r\n",
|
|
|
"id": 2527,
|
|
|
"edit_time": 1426487702,
|
|
|
"view_num": 194,
|
|
|
"caption": "Aline de rose 2015 春季新品发布",
|
|
|
"pic_url": "/2015/03/16/14/025bfd04da8473232f11c7727ac84a7c79.jpg"
|
|
|
}
|
|
|
],
|
|
|
"code": 200
|
|
|
}
|
|
|
|
|
|
查询为空:
|
|
|
|
|
|
http://192.168.10.64:8080/yohosearch/storehouse/search.json?query=test&status=1&category=3
|
|
|
|
|
|
|
|
|
{
|
|
|
code:200
|
|
|
data:[
|
|
|
]
|
|
|
}
|
|
|
|
|
|
|
|
|
4.2.2 参数说明
|
|
|
|
|
|
|
|
|
名称 说明
|
|
|
|
|
|
data 结果集
|
|
|
|
|
|
id 文章id
|
|
|
|
|
|
caption 标题
|
|
|
|
|
|
pic_url 图片地址
|
|
|
|
|
|
content 文章内容
|
|
|
|
|
|
edit_time 编辑时间
|
|
|
|
|
|
view_num 查看数
|
|
|
|
|
|
|
|
|
5.1 请求
|
|
|
|
|
|
5.1.1 URL格式
|
|
|
|
|
|
http://{host}:{port}/shops.json?keyword={searchquery}
|
|
|
|
|
|
host:服务器地址;
|
|
|
|
|
|
port:应用服务器端口;
|
|
|
|
|
|
yohosearch:服务实例名;
|
|
|
|
|
|
其他参数见5.1.2
|
|
|
|
|
|
5.1.2 参数说明
|
|
|
|
|
|
名称 说明 可空
|
|
|
|
|
|
keyword 关键字 否
|
|
|
|
|
|
5.2 响应
|
|
|
|
|
|
5.2.1 报文格式
|
|
|
|
|
|
响应报文为json格式
|
|
|
|
|
|
成功:
|
|
|
|
|
|
http://localhost:8081/yohosearch/shops.json?keyword=Life%20After%20Life
|
|
|
|
|
|
{
|
|
|
"message": "shops info",
|
|
|
"data": {
|
|
|
"id": 208,
|
|
|
"brand_domain": "lal",
|
|
|
"brand_ico": "/2014/02/07/13/0118e52b6f94d0f566bb6e17b1a08ac165.png",
|
|
|
"brand_name": "Life•After Life"
|
|
|
},
|
|
|
"code": 200
|
|
|
}
|
|
|
|
|
|
查询为空:
|
|
|
|
|
|
http://localhost:8081/yohosearch/shops.json?keyword=上衣
|
|
|
|
|
|
|
|
|
{
|
|
|
"message": "shops info",
|
|
|
"data": {},
|
|
|
"code": 200
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
5.2.2 参数说明
|
|
|
|
|
|
名称 说明
|
|
|
|
|
|
data 结果集
|
|
|
|
|
|
id 品牌id
|
|
|
|
|
|
brand_domain 品牌域名
|
|
|
|
|
|
brand_ico 品牌图标
|
|
|
|
|
|
brand_name 品牌名称
|
|
|
|
|
|
6. 品牌列表接口 品牌一览
|
|
|
7.
|
|
|
6.1 请求
|
|
|
|
|
|
6.1.1 URL格式
|
|
|
|
|
|
http://{host}:{port}/brand/list.json
|
|
|
|
|
|
host:服务器地址;
|
|
|
|
|
|
port:应用服务器端口;
|
|
|
|
|
|
yohosearch:服务实例名;
|
|
|
|
|
|
功能说明:列出品牌的全部列表
|
|
|
|
|
|
7. 品牌检索接口
|
|
|
8.
|
|
|
7.1 请求
|
|
|
|
|
|
7.1.1 URL格式
|
|
|
|
|
|
http://{host}:{port}/brands.json?status={status}
|
|
|
|
|
|
host:服务器地址;
|
|
|
|
|
|
port:应用服务器端口;
|
|
|
|
|
|
yohosearch:服务实例名;
|
|
|
|
|
|
功能说明:从商品中聚合出所有有效的品牌,所有的参数同商品检索参数。用于品牌一览页面。
|
|
|
|
|
|
|
|
|
8. 按照品牌group接口 app使用品牌收藏
|
|
|
|
|
|
8.1 请求
|
|
|
|
|
|
8.1.1 URL格式
|
|
|
|
|
|
http://{host}:{port}/group_brands.json?brand=1,2,3&viewNum=20&attribute_not=2&status=1&stocknumber=1&new=1
|
|
|
|
|
|
host:服务器地址;
|
|
|
|
|
|
port:应用服务器端口;
|
|
|
|
|
|
|
|
|
yohosearch:服务实例名;
|
|
|
|
|
|
功能说明:主要用于用户收藏品牌,多个品牌进行group。
|
|
|
参数同商品搜索接口。不同点:brand参数不为空,viewNum可以为0,不返回商品的数据,只返回每个品牌的商品数量
|
|
|
返回数据示例:
|
|
|
|
|
|
{
|
|
|
"message": "groupBrands List.",
|
|
|
"data": {
|
|
|
"total": 579,
|
|
|
"brands": {
|
|
|
"1": {
|
|
|
"product_list": [
|
|
|
{
|
|
|
"is_limited": "N",
|
|
|
"vip_discount_type": 3,
|
|
|
……
|
|
|
}
|
|
|
],
|
|
|
"count": 450
|
|
|
},
|
|
|
"2": {
|
|
|
"product_list": [
|
|
|
{
|
|
|
"product_id": 217,
|
|
|
"product_skn": 50001665,
|
|
|
……
|
|
|
}
|
|
|
],
|
|
|
"count": 129
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"code": 200
|
|
|
}
|
|
|
|
|
|
9. 按照品牌取最新商品接口 APP新品到着
|
|
|
|
|
|
9.1 请求
|
|
|
|
|
|
9.1.1 URL格式
|
|
|
|
|
|
http://{host}:{port}/new_product.json?brand=1,2,3&limit=8&order=shelve_time:desc&shelve_time=1448331539,1448936339&attribute_not=2&status=1&stocknumber=1
|
|
|
|
|
|
host:服务器地址;
|
|
|
|
|
|
port:应用服务器端口;
|
|
|
|
|
|
yohosearch:服务实例名;
|
|
|
|
|
|
功能说明:主要用于新品到着,每个自主品牌获取1个。
|
|
|
参数基本品搜索接口。
|
|
|
|
|
|
不同点:brand参数不为空,order参数只支持1个,如按照库存降序order=storage_num:desc 按照销量降序:order=sales_num:desc
|
|
|
limit参数表示需要返回的总共的商品的个数
|
|
|
|
|
|
返回数据示例:
|
|
|
|
|
|
{
|
|
|
"message": "new product List.",
|
|
|
"data": [
|
|
|
{
|
|
|
"product_id": 108113,
|
|
|
……
|
|
|
"product_skn": 51068626
|
|
|
},
|
|
|
……
|
|
|
{
|
|
|
"product_id": 185963,
|
|
|
……
|
|
|
"product_skn": 51108008
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"code": 200
|
|
|
}
|
|
|
|
|
|
10. 最新上架按照品牌去重 最新上架,品牌去重
|
|
|
|
|
|
|
|
|
10.1 请求
|
|
|
|
|
|
10.1.1 URL格式
|
|
|
|
|
|
http://{host}:{port}/new-shelve.json?order=shelve_time:desc&shelve_time=1448331539,1448936339&attribute_not=2&status=1&stocknumber=1
|
|
|
|
|
|
host:服务器地址;
|
|
|
|
|
|
port:应用服务器端口;
|
|
|
|
|
|
yohosearch:服务实例名;
|
|
|
|
|
|
功能说明:主要用于潮童和创意生活首页最新上架。
|
|
|
参数基本与商品搜索接口相同。不支持needFilter以及highlight参数
|
|
|
返回数据示例:
|
|
|
|
|
|
{
|
|
|
"message": "new product List.",
|
|
|
"data": [
|
|
|
{
|
|
|
"product_id": 108113,
|
|
|
……
|
|
|
"product_skn": 51068626
|
|
|
},
|
|
|
……
|
|
|
{
|
|
|
"product_id": 185963,
|
|
|
……
|
|
|
"product_skn": 51108008
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"code": 200
|
|
|
}
|
|
|
|
|
|
11. 用户搜索历史记录接口 11以后不上线了
|
|
|
12.
|
|
|
11.1 用户搜索历史记录添加
|
|
|
|
|
|
11.1.1 URL格式
|
|
|
|
|
|
http://{host}:{port}/yohosearch/words/user-history.json?un-id=12333&uid=123&word=上衣&platform=1×tamp=1441767457
|
|
|
协议:GET
|
|
|
|
|
|
host:服务器地址;
|
|
|
|
|
|
port:应用服务器端口;
|
|
|
|
|
|
yohosearch:服务实例名;
|
|
|
|
|
|
功能说明:添加用户搜索记录
|
|
|
|
|
|
11.1.2 参数说明
|
|
|
|
|
|
名称 说明 可空
|
|
|
|
|
|
un-id 未登录用户的随机id或者移动设备的编号 是
|
|
|
uid 用户id 是
|
|
|
|
|
|
word 用户搜索词 否
|
|
|
|
|
|
platform 平台 int类型 1:PC;2:ios;3:Android 否
|
|
|
|
|
|
timestamp 时间戳 long类型 否
|
|
|
|
|
|
返回数据示例:
|
|
|
{
|
|
|
"message": "success",
|
|
|
"code": 200
|
|
|
}
|
|
|
|
|
|
11.2 用户搜索历史记录查询
|
|
|
|
|
|
11.2.1 URL格式
|
|
|
|
|
|
http://{host}:{port}/yohosearch/words/user-history-get.json?id=12333&type=1&platform=1
|
|
|
协议:GET
|
|
|
|
|
|
host:服务器地址;
|
|
|
|
|
|
port:应用服务器端口;
|
|
|
|
|
|
yohosearch:服务实例名;
|
|
|
|
|
|
功能说明:用户搜索记录查询。
|
|
|
|
|
|
|
|
|
名称 说明 可空
|
|
|
|
|
|
id id 可以是用户id也可以是未登录id 否
|
|
|
|
|
|
type id的类型 否
|
|
|
|
|
|
platform 平台 int类型 1:PC;2:ios;3:Android 否
|
|
|
|
|
|
返回数据示例:
|
|
|
{
|
|
|
"data": [
|
|
|
"上衣"
|
|
|
],
|
|
|
"message": "success",
|
|
|
"code": 200
|
|
|
}
|
|
|
|
|
|
|
|
|
11.3 用户搜索历史记录删除
|
|
|
|
|
|
11.3.1 URL格式
|
|
|
|
|
|
http://{host}:{port}/yohosearch/words/user-history-remove.json?un-id=12333&uid=123&platform=1
|
|
|
协议:GET
|
|
|
|
|
|
host:服务器地址;
|
|
|
|
|
|
port:应用服务器端口;
|
|
|
|
|
|
yohosearch:服务实例名;
|
|
|
|
|
|
功能说明:用户搜索记录删除。
|
|
|
|
|
|
|
|
|
11.3.2 参数说明
|
|
|
|
|
|
名称 说明 可空
|
|
|
|
|
|
un-id 未登录用户的随机id或者移动设备的编号 是
|
|
|
|
|
|
uid 用户id 是
|
|
|
|
|
|
platform 平台 int类型 1:PC;2:ios;3:Android 否
|
|
|
|
|
|
返回数据示例:
|
|
|
|
|
|
|
|
|
{
|
|
|
"message": "success",
|
|
|
"code": 200
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
...
|
...
|
|