Authored by wangnan

搜索文档整理

Showing 33 changed files with 491 additions and 491 deletions
1 -  
2 -  
3 -# 接口编号  
4 -  
5 - 接口编号用于接口降级使用  
6 -  
7 -## api.yoho.cn  
8 -  
9 -|接口名称| 编号|  
10 -|---|:---|  
11 -|app.product.intro|1|  
12 -|app.product.data|2|  
13 -|app.sort.get|3|  
14 -|app.search.category|4|  
15 -|app.search.sales|5|  
16 -|app.search.newProduct|6|  
17 -|app.search.fuzzy|7|  
18 -|app.search.li|8|  
19 -|app.brand.brandlist|9|  
20 -|app.search.brand|10|  
21 -|app.favorite.add|11|  
22 -|app.favorite.cancel|12|  
23 -|app.home.preference|13|  
24 -|app.search.top|14|  
25 -|app.search.last7day|15|  
26 -|h5.consult.li|16|  
27 -|h5.consult.add|17|  
28 -|h5.preference.Search|18|  
29 -|h5.sortPreference.Search|19|  
30 -|h5.product.data|20|  
31 -|h5.product.intro|21|  
32 -|app.config.fashioncodeTemplate|22|  
33 -|app.promotion.sendCheckCode|23|  
34 -|app.promotion.getCoupon|24|  
35 -|app.promotion.validCode|25|  
36 -|app.promotion.queryCoupon|26|  
37 -|app.address.get|27|  
38 -|app.address.getlist|28|  
39 -|app.address.add|29|  
40 -|app.address.del|30|  
41 -|app.address.setDefault|31|  
42 -|app.address.provinces|32|  
43 -|app.address.update|33|  
44 -|inbox.updateInbox|34|  
45 -|inbox.queryListById|35|  
46 -|app.inbox.getlist|36|  
47 -|app.inbox.getlistnew|37|  
48 -|app.register.sendRegCodeToMobile|38|  
49 -|app.register.validRegCode|39|  
50 -|app.coupons.total|40|  
51 -|app.coupons.li|41|  
52 -|app.home.getInfoNum|42|  
53 -|app.passport.register|43|  
54 -|app.passport.profile|44|  
55 -|app.passport.signin|45|  
56 -|app.passport.signinByOpenID|46|  
57 -|app.passport.bind|47|  
58 -|app.passport.changeCheck|48|  
59 -|app.passport.modifyBase|49|  
60 -|app.passport.check|50|  
61 -|app.passport.getPrivilege|51|  
62 -|app.passport.smsbind|52|  
63 -|app.passport.vip|53|  
64 -|app.passport.changeMobile|54|  
65 -|app.brand.getBrandIntro|55|  
66 -|app.yohocoin.lists|56|  
67 -|app.yohocoin.total|57|  
68 -|show.toShareOrderList|58|  
69 -|show.productShareOrderList|59|  
70 -|show.allToShareOrderList|60|  
71 -|show.ownerShareList|61|  
72 -|show.otherToShareOrderList|62|  
73 -|show.showChannel|63|  
74 -|show.saveShareOrder|64|  
75 -|app.SpaceOrders.getShareOrder|65|  
76 -|app.SpaceOrders.info|66|  
77 -|app.SpaceOrders.get|67|  
78 -|app.SpaceOrders.detail|68|  
79 -|app.SpaceOrders.confirm|69|  
80 -|app.favorite.brand|70|  
81 -|app.favorite.product|71|  
82 -|app.consult.add|72|  
83 -|app.consult.li|73|  
84 -|app.consult.common|74|  
85 -|app.product.preference|75|  
86 -|app.consult.useful|76|  
87 -|app.consult.like|77|  
88 -|app.resources.config.clientInitConfig|78|  
89 -|app.Shopping.add|79|  
90 -|app.Shopping.cart|80|  
91 -|app.Shopping.increase|81|  
92 -|app.Shopping.decrease|82|  
93 -|app.Shopping.swap|83|  
94 -|app.Shopping.remove|84|  
95 -|app.Shopping.payment|85|  
96 -|app.Shopping.count|86|  
97 -|app.Shopping.selected|87|  
98 -|app.Shopping.compute|88|  
99 -|app.Shopping.useCoupon|89|  
100 -|app.Shopping.submit|90|  
101 -|app.yoho.yohocoin|91|  
102 -|app.browse.product|92|  
103 -|app.browse.delete|93|  
104 -|app.yoho.redpacket|94|  
105 -|app.yoho.redpacketInfo|95|  
106 -|app.promotion.queryBirthCoupon|96|  
107 -|app.resources.getNotices|97|  
108 -|app.promotion.queryUserShowYohoCoin|98|  
109 -|app.Shopping.usePromotionCode|99|  
110 -|show.addPraise|100|  
111 -|show.cancelPraise|101|  
112 -|app.promotion_code.get|102|  
113 -|app.express.get|103|  
114 -|app.express.li|104|  
115 -|app.express.getExpressInfo|105|  
116 -|app.express.getExpressCompany|106|  
117 -|app.express.getNewExpress|107|  
118 -|app.express.getRefundExpress|108|  
119 -|app.refund.goodsList|109|  
120 -|app.refund.getList|110|  
121 -|app.refund.detail|111|  
122 -|app.refund.setexpress|112|  
123 -|app.refund.submit|113|  
124 -|app.SpaceOrders.close|114|  
125 -|app.SpaceOrders.delOrderByCode|115|  
126 -|app.register.sendBackpwdCodeToMobile|116|  
127 -|app.register.validBackpwdCode|117|  
128 -|app.register.changepwdByMobileCode|118|  
129 -|app.register.backpwdByEmail|119|  
130 -|app.inbox.getTotal|120|  
131 -|app.product.gift|121|  
132 -|app.consult.lastTwo|122|  
133 -|show.recentShareOrderByProductId|123|  
134 -|app.SpaceOrders.payConfirm|124|  
135 -|app.SpaceOrders.updateOrdersPaymentByCode|125|  
136 -|app.Shopping.erpSubmitStat|126|  
137 -|app.search.getTerms|127|  
138 -|app.search.compareRecord|128|  
139 -|app.search.getTerms|129|  
140 -|app.brand.banner|130|  
141 -|app.SpaceOrders.close|131|  
142 -|app.change.submit|132|  
143 -|app.change.detail|133|  
144 -|app.change.setexpress|134|  
145 -|app.change.getDelivery|135|  
146 -|app.change.goodsList|136|  
147 -|app.cover.getCoverStart|137|  
148 -|app.msgsys.getIosUser|138|  
149 -|app.Msgsys.getAndroidUser|139|  
150 -|app.msgsys.pushIosUser|140|  
151 -|app.Msgsys.pushAndroidUser|141|  
152 -|app.activity.getlist|142|  
153 -|app.activity.bindaccount|143|  
154 -|app.activity.getshare|144|  
155 -|app.activity.addshare|145|  
156 -|app.search.lifeStyle|146|  
157 -|app.search.kids|147|  
158 -|app.brand.banner|148|  
159 -|app.help.li|149|  
160 -|app.help.detail|150|  
161 -|app.drawline.getQueueList|151|  
162 -|app.drawline.addQueue|152|  
163 -|app.drawline.getUserActivityInfo|153|  
164 -|app.drawline.getActivityInfo|154|  
165 -|app.drawline.getLuckyUserList|155|  
166 -|app.drawline.changeTaskValue|156|  
167 -|app.limitcode.add|157|  
168 -|app.limitcode.query|158|  
169 -|app.limitcode.showredpoint|159|  
170 -|app.limitcode.deleteinvalid|160|  
171 -|app.limitProduct.alreadySaleLimitProduct|161|  
172 -|app.limitProduct.hotLimitProduct|162|  
173 -|app.limitProduct.soonToSaleLimitProduct|163|  
174 -|app.limitProduct.limitProductDetail|164|  
175 -|app.limitProduct.limitProductHtml|165|  
176 -|app.reminder.addUserReminder|166|  
177 -|app.reminder.getUserReminder|167|  
178 -|show.notCommentRecordCount|168|  
179 -|app.help.li|169|  
180 -|app.help.detail|170|  
181 -  
182 -## service.yoho.cn  
183 -|接口名称| 编号|  
184 -|---|:---|  
185 -|/operations/api/v5/webshare/getShare|1000|  
186 -|/operations/api/v4/icon/getIcon|1001|  
187 -|/operations/api/v5/resource/home |1002|  
188 -|/operations/api/v5/resource/get |1003|  
189 -|/union/UnionRest/activeUnion |1004|  
190 -|/payment/wechat_data |1005|  
191 -|/payment/wechat_notify|1006|  
192 -|/payment/alipaywap_notify |1007|  
193 -|/payment/wechatwap_notify |1008|  
194 -|/payment/alipay_notify |1009|  
195 -|/payment/alipay_newnotify |1010|  
196 -|/payment/unionpay_notify|1011|  
197 -|/payment/unionpay_newnotify|1012|  
198 -|/payment/unionpay_data|1013|  
199 -|/operations/api/v5/help/getCategory|1014|  
200 -|/operations/api/v5/help/getHelp|1015|  
201 -|/operations/api/v5/help/getHelpContent|1016|  
202 -|/operations/api/v6/category/getCategory|1017|  
203 -|/operations/api/v5/entrance/getEntrance|1018| 1 +
  2 +
  3 +# 接口编号
  4 +
  5 + 接口编号用于接口降级使用
  6 +
  7 +## api.yoho.cn
  8 +
  9 +|接口名称| 编号|
  10 +|---|:---|
  11 +|app.product.intro|1|
  12 +|app.product.data|2|
  13 +|app.sort.get|3|
  14 +|app.search.category|4|
  15 +|app.search.sales|5|
  16 +|app.search.newProduct|6|
  17 +|app.search.fuzzy|7|
  18 +|app.search.li|8|
  19 +|app.brand.brandlist|9|
  20 +|app.search.brand|10|
  21 +|app.favorite.add|11|
  22 +|app.favorite.cancel|12|
  23 +|app.home.preference|13|
  24 +|app.search.top|14|
  25 +|app.search.last7day|15|
  26 +|h5.consult.li|16|
  27 +|h5.consult.add|17|
  28 +|h5.preference.Search|18|
  29 +|h5.sortPreference.Search|19|
  30 +|h5.product.data|20|
  31 +|h5.product.intro|21|
  32 +|app.config.fashioncodeTemplate|22|
  33 +|app.promotion.sendCheckCode|23|
  34 +|app.promotion.getCoupon|24|
  35 +|app.promotion.validCode|25|
  36 +|app.promotion.queryCoupon|26|
  37 +|app.address.get|27|
  38 +|app.address.getlist|28|
  39 +|app.address.add|29|
  40 +|app.address.del|30|
  41 +|app.address.setDefault|31|
  42 +|app.address.provinces|32|
  43 +|app.address.update|33|
  44 +|inbox.updateInbox|34|
  45 +|inbox.queryListById|35|
  46 +|app.inbox.getlist|36|
  47 +|app.inbox.getlistnew|37|
  48 +|app.register.sendRegCodeToMobile|38|
  49 +|app.register.validRegCode|39|
  50 +|app.coupons.total|40|
  51 +|app.coupons.li|41|
  52 +|app.home.getInfoNum|42|
  53 +|app.passport.register|43|
  54 +|app.passport.profile|44|
  55 +|app.passport.signin|45|
  56 +|app.passport.signinByOpenID|46|
  57 +|app.passport.bind|47|
  58 +|app.passport.changeCheck|48|
  59 +|app.passport.modifyBase|49|
  60 +|app.passport.check|50|
  61 +|app.passport.getPrivilege|51|
  62 +|app.passport.smsbind|52|
  63 +|app.passport.vip|53|
  64 +|app.passport.changeMobile|54|
  65 +|app.brand.getBrandIntro|55|
  66 +|app.yohocoin.lists|56|
  67 +|app.yohocoin.total|57|
  68 +|show.toShareOrderList|58|
  69 +|show.productShareOrderList|59|
  70 +|show.allToShareOrderList|60|
  71 +|show.ownerShareList|61|
  72 +|show.otherToShareOrderList|62|
  73 +|show.showChannel|63|
  74 +|show.saveShareOrder|64|
  75 +|app.SpaceOrders.getShareOrder|65|
  76 +|app.SpaceOrders.info|66|
  77 +|app.SpaceOrders.get|67|
  78 +|app.SpaceOrders.detail|68|
  79 +|app.SpaceOrders.confirm|69|
  80 +|app.favorite.brand|70|
  81 +|app.favorite.product|71|
  82 +|app.consult.add|72|
  83 +|app.consult.li|73|
  84 +|app.consult.common|74|
  85 +|app.product.preference|75|
  86 +|app.consult.useful|76|
  87 +|app.consult.like|77|
  88 +|app.resources.config.clientInitConfig|78|
  89 +|app.Shopping.add|79|
  90 +|app.Shopping.cart|80|
  91 +|app.Shopping.increase|81|
  92 +|app.Shopping.decrease|82|
  93 +|app.Shopping.swap|83|
  94 +|app.Shopping.remove|84|
  95 +|app.Shopping.payment|85|
  96 +|app.Shopping.count|86|
  97 +|app.Shopping.selected|87|
  98 +|app.Shopping.compute|88|
  99 +|app.Shopping.useCoupon|89|
  100 +|app.Shopping.submit|90|
  101 +|app.yoho.yohocoin|91|
  102 +|app.browse.product|92|
  103 +|app.browse.delete|93|
  104 +|app.yoho.redpacket|94|
  105 +|app.yoho.redpacketInfo|95|
  106 +|app.promotion.queryBirthCoupon|96|
  107 +|app.resources.getNotices|97|
  108 +|app.promotion.queryUserShowYohoCoin|98|
  109 +|app.Shopping.usePromotionCode|99|
  110 +|show.addPraise|100|
  111 +|show.cancelPraise|101|
  112 +|app.promotion_code.get|102|
  113 +|app.express.get|103|
  114 +|app.express.li|104|
  115 +|app.express.getExpressInfo|105|
  116 +|app.express.getExpressCompany|106|
  117 +|app.express.getNewExpress|107|
  118 +|app.express.getRefundExpress|108|
  119 +|app.refund.goodsList|109|
  120 +|app.refund.getList|110|
  121 +|app.refund.detail|111|
  122 +|app.refund.setexpress|112|
  123 +|app.refund.submit|113|
  124 +|app.SpaceOrders.close|114|
  125 +|app.SpaceOrders.delOrderByCode|115|
  126 +|app.register.sendBackpwdCodeToMobile|116|
  127 +|app.register.validBackpwdCode|117|
  128 +|app.register.changepwdByMobileCode|118|
  129 +|app.register.backpwdByEmail|119|
  130 +|app.inbox.getTotal|120|
  131 +|app.product.gift|121|
  132 +|app.consult.lastTwo|122|
  133 +|show.recentShareOrderByProductId|123|
  134 +|app.SpaceOrders.payConfirm|124|
  135 +|app.SpaceOrders.updateOrdersPaymentByCode|125|
  136 +|app.Shopping.erpSubmitStat|126|
  137 +|app.search.getTerms|127|
  138 +|app.search.compareRecord|128|
  139 +|app.search.getTerms|129|
  140 +|app.brand.banner|130|
  141 +|app.SpaceOrders.close|131|
  142 +|app.change.submit|132|
  143 +|app.change.detail|133|
  144 +|app.change.setexpress|134|
  145 +|app.change.getDelivery|135|
  146 +|app.change.goodsList|136|
  147 +|app.cover.getCoverStart|137|
  148 +|app.msgsys.getIosUser|138|
  149 +|app.Msgsys.getAndroidUser|139|
  150 +|app.msgsys.pushIosUser|140|
  151 +|app.Msgsys.pushAndroidUser|141|
  152 +|app.activity.getlist|142|
  153 +|app.activity.bindaccount|143|
  154 +|app.activity.getshare|144|
  155 +|app.activity.addshare|145|
  156 +|app.search.lifeStyle|146|
  157 +|app.search.kids|147|
  158 +|app.brand.banner|148|
  159 +|app.help.li|149|
  160 +|app.help.detail|150|
  161 +|app.drawline.getQueueList|151|
  162 +|app.drawline.addQueue|152|
  163 +|app.drawline.getUserActivityInfo|153|
  164 +|app.drawline.getActivityInfo|154|
  165 +|app.drawline.getLuckyUserList|155|
  166 +|app.drawline.changeTaskValue|156|
  167 +|app.limitcode.add|157|
  168 +|app.limitcode.query|158|
  169 +|app.limitcode.showredpoint|159|
  170 +|app.limitcode.deleteinvalid|160|
  171 +|app.limitProduct.alreadySaleLimitProduct|161|
  172 +|app.limitProduct.hotLimitProduct|162|
  173 +|app.limitProduct.soonToSaleLimitProduct|163|
  174 +|app.limitProduct.limitProductDetail|164|
  175 +|app.limitProduct.limitProductHtml|165|
  176 +|app.reminder.addUserReminder|166|
  177 +|app.reminder.getUserReminder|167|
  178 +|show.notCommentRecordCount|168|
  179 +|app.help.li|169|
  180 +|app.help.detail|170|
  181 +
  182 +## service.yoho.cn
  183 +|接口名称| 编号|
  184 +|---|:---|
  185 +|/operations/api/v5/webshare/getShare|1000|
  186 +|/operations/api/v4/icon/getIcon|1001|
  187 +|/operations/api/v5/resource/home |1002|
  188 +|/operations/api/v5/resource/get |1003|
  189 +|/union/UnionRest/activeUnion |1004|
  190 +|/payment/wechat_data |1005|
  191 +|/payment/wechat_notify|1006|
  192 +|/payment/alipaywap_notify |1007|
  193 +|/payment/wechatwap_notify |1008|
  194 +|/payment/alipay_notify |1009|
  195 +|/payment/alipay_newnotify |1010|
  196 +|/payment/unionpay_notify|1011|
  197 +|/payment/unionpay_newnotify|1012|
  198 +|/payment/unionpay_data|1013|
  199 +|/operations/api/v5/help/getCategory|1014|
  200 +|/operations/api/v5/help/getHelp|1015|
  201 +|/operations/api/v5/help/getHelpContent|1016|
  202 +|/operations/api/v6/category/getCategory|1017|
  203 +|/operations/api/v5/entrance/getEntrance|1018|
204 |/operations/api/v5/version/getVersion|1019| 204 |/operations/api/v5/version/getVersion|1019|
1 -## 1、获取品类对应的size##  
2 -  
3 -(/sort_sizes.json)  
4 -请求方式:get  
5 -#### 请求参数  
6 -| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |  
7 -|:-------| -----:|-----:|-----:|-----:|----:|  
8 -|breaking|String|否|1|1|1:断码 0:非断码,传空字符串则表示不限|  
9 -|storage_num|String|否|1|1|sku库存的最小值|  
10 -|sort|String|否|119|null|小分类id,以逗号隔开|  
11 -|size|String|否|203|null|尺码 Id,以逗号隔开|  
12 -|productStatus|String|否|1|1|商品状态1:上架 非1:下架,主动传空字符串表示不限|  
13 -|attribute_not|String|否|2|2|1: 取赠品 2:不取赠品,主动传空字符串表示不限|  
14 -  
15 -  
16 -请求示例  
17 -http://192.168.10.64:8080/yohosearch/sort_sizes.json?breaking=1&storage_num=1  
18 -  
19 -### 响应  
20 -code为200即为成功且只会返回200,其他code表示失败。  
21 -响应JSON格式如下所示:  
22 -```json  
23 -{  
24 - "code": 200,  
25 - "message": "success",  
26 - "data": {  
27 - "total": 3,  
28 - "list": [  
29 - {  
30 - "small_sort_id": 119,  
31 - "middle_sort_id": 16,  
32 - "max_sort_id": 1,  
33 - "count": 2,  
34 - "sizes": [  
35 - {  
36 - "size_id": 203,  
37 - "size_name": "M"  
38 - },  
39 - {  
40 - "size_id": 271,  
41 - "size_name": "52"  
42 - }  
43 - ]  
44 - },  
45 - {  
46 - "small_sort_id": 114,  
47 - "middle_sort_id": 11,  
48 - "max_sort_id": 1,  
49 - "count": 5,  
50 - "sizes": [  
51 - {  
52 - "size_id": 201,  
53 - "size_name": "L"  
54 - },  
55 - {  
56 - "size_id": 203,  
57 - "size_name": "M"  
58 - },  
59 - {  
60 - "size_id": 211,  
61 - "size_name": "XL"  
62 - },  
63 - {  
64 - "size_id": 207,  
65 - "size_name": "S"  
66 - },  
67 - {  
68 - "size_id": 199,  
69 - "size_name": "F"  
70 - }  
71 - ]  
72 - },  
73 - {  
74 - "small_sort_id": 433,  
75 - "middle_sort_id": 429,  
76 - "max_sort_id": 365,  
77 - "count": 1,  
78 - "sizes": [  
79 - {  
80 - "size_id": 199,  
81 - "size_name": "F"  
82 - }  
83 - ]  
84 - }  
85 - ]  
86 - }  
87 -}  
88 -```  
89 -  
90 -  
91 -## 2、根据品类、库存、断码等获取商品列表(fix search.json的库存功能)##  
92 -(/sort_size_products.json)  
93 -请求方式:get  
94 -#### 请求参数  
95 -| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |  
96 -|:-------| -----:|-----:|-----:|-----:|----:|  
97 -|storage_num|String|否|1|1|sku库存的最小值,不传默认1|  
98 -|breaking|String|否|1|为1|1:断码 0:非断码,不传默认1|  
99 -|sort|String|否|119|null|小分类id,以逗号隔开,不传默认空|  
100 -|size|String|否|203|null|尺码 Id,以逗号隔开,不传默认空|  
101 -|status|String|否|1|1|商品状态1:上架 非1:下架,不传默认为1|  
102 -  
103 -|其他参数|||||同search.json的参数|  
104 -  
105 -  
106 -  
107 -请求示例  
108 -http://192.168.10.64:8080/yohosearch/sort_size_products.json?breaking=1&storage_num=1&sort=119&size=203  
109 -  
110 -### 响应  
111 -code为200即为成功且只会返回200,其他code表示失败。  
112 -响应JSON格同search.json 1 +## 1、获取品类对应的size##
  2 +
  3 +(/sort_sizes.json)
  4 +请求方式:get
  5 +#### 请求参数
  6 +| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
  7 +|:-------| -----:|-----:|-----:|-----:|----:|
  8 +|breaking|String|否|1|1|1:断码 0:非断码,传空字符串则表示不限|
  9 +|storage_num|String|否|1|1|sku库存的最小值|
  10 +|sort|String|否|119|null|小分类id,以逗号隔开|
  11 +|size|String|否|203|null|尺码 Id,以逗号隔开|
  12 +|productStatus|String|否|1|1|商品状态1:上架 非1:下架,主动传空字符串表示不限|
  13 +|attribute_not|String|否|2|2|1: 取赠品 2:不取赠品,主动传空字符串表示不限|
  14 +
  15 +
  16 +请求示例
  17 +http://192.168.10.64:8080/yohosearch/sort_sizes.json?breaking=1&storage_num=1
  18 +
  19 +### 响应
  20 +code为200即为成功且只会返回200,其他code表示失败。
  21 +响应JSON格式如下所示:
  22 +```json
  23 +{
  24 + "code": 200,
  25 + "message": "success",
  26 + "data": {
  27 + "total": 3,
  28 + "list": [
  29 + {
  30 + "small_sort_id": 119,
  31 + "middle_sort_id": 16,
  32 + "max_sort_id": 1,
  33 + "count": 2,
  34 + "sizes": [
  35 + {
  36 + "size_id": 203,
  37 + "size_name": "M"
  38 + },
  39 + {
  40 + "size_id": 271,
  41 + "size_name": "52"
  42 + }
  43 + ]
  44 + },
  45 + {
  46 + "small_sort_id": 114,
  47 + "middle_sort_id": 11,
  48 + "max_sort_id": 1,
  49 + "count": 5,
  50 + "sizes": [
  51 + {
  52 + "size_id": 201,
  53 + "size_name": "L"
  54 + },
  55 + {
  56 + "size_id": 203,
  57 + "size_name": "M"
  58 + },
  59 + {
  60 + "size_id": 211,
  61 + "size_name": "XL"
  62 + },
  63 + {
  64 + "size_id": 207,
  65 + "size_name": "S"
  66 + },
  67 + {
  68 + "size_id": 199,
  69 + "size_name": "F"
  70 + }
  71 + ]
  72 + },
  73 + {
  74 + "small_sort_id": 433,
  75 + "middle_sort_id": 429,
  76 + "max_sort_id": 365,
  77 + "count": 1,
  78 + "sizes": [
  79 + {
  80 + "size_id": 199,
  81 + "size_name": "F"
  82 + }
  83 + ]
  84 + }
  85 + ]
  86 + }
  87 +}
  88 +```
  89 +
  90 +
  91 +## 2、根据品类、库存、断码等获取商品列表(fix search.json的库存功能)##
  92 +(/sort_size_products.json)
  93 +请求方式:get
  94 +#### 请求参数
  95 +| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
  96 +|:-------| -----:|-----:|-----:|-----:|----:|
  97 +|storage_num|String|否|1|1|sku库存的最小值,不传默认1|
  98 +|breaking|String|否|1|为1|1:断码 0:非断码,不传默认1|
  99 +|sort|String|否|119|null|小分类id,以逗号隔开,不传默认空|
  100 +|size|String|否|203|null|尺码 Id,以逗号隔开,不传默认空|
  101 +|status|String|否|1|1|商品状态1:上架 非1:下架,不传默认为1|
  102 +
  103 +|其他参数|||||同search.json的参数|
  104 +
  105 +
  106 +
  107 +请求示例
  108 +http://192.168.10.64:8080/yohosearch/sort_size_products.json?breaking=1&storage_num=1&sort=119&size=203
  109 +
  110 +### 响应
  111 +code为200即为成功且只会返回200,其他code表示失败。
  112 +响应JSON格同search.json
1 -# 全球购Yoho商品搜索引擎融合方案  
2 -  
3 -目前全球购和yoho商品在搜索引擎中的索引是不同的,分别是tplproduct 和productindex。由于productindex的字段远远多于tplproduct的字段,所以整个融合过程会分为几个阶段,循序渐进来完成2个商品共用一个索引。  
4 -  
5 - - 适配模式。通过开发适配器,把全球购的字段转化成yoho商品的字段,全球购商品更新到productindex中  
6 -  
7 -  
8 -### Version  
9 -1.0.0  
10 -  
11 -### tplproduct字段定义  
12 -字段 | 说明  
13 ------|-----  
14 -product_skn|商品skn  
15 -product_name|商品名称  
16 -source|商品来源  
17 -brand_id|品牌id  
18 -sort_one|一级品类id  
19 -sort_two|二级品类id  
20 -sort_three|三级品类id  
21 -sort_four|四级品类id  
22 -product_url|商品网址  
23 -site_id|网站id  
24 -is_limited|是否是限量商品  
25 -country_id|国家编码  
26 -gender|性别 1.男 2.女 3.通用  
27 -currency_id|货币id  
28 -tag_price|吊牌价  
29 -orign_price|销售价(计算汇率后的)  
30 -sell_price|最小销售价  
31 -goods_price|最小商品价格(计算汇率后的)  
32 -got_price|最小到手价  
33 -weight|重量  
34 -size_info|尺码  
35 -status|商品状态  
36 -url_status|爬虫状态 1.生效 2.失效  
37 -stock_status|库存状态 1.有 2.无  
38 -operate_userid|操作人id  
39 -order|排序序列  
40 -create_time|创建时间  
41 -update_time|更新时间  
42 -shelf_time|上架时间  
43 -offshelf_time|定时下架时间  
44 -auto_shelf|是否自动上架 1.自动 2.手动  
45 -color_ids|skc颜色id组合 (1,2,3)  
46 -skc|skc的集合  
47 -cover|商品封面图  
48 -  
49 -### productindex字段定义  
50 -字段 | 定义 | NULL| Key|DEFAULT  
51 ------|-----|-----|----|-----  
52 -id |int(11)| unsigned| NO | 0  
53 -product_id |int(11) |unsigned |NO | 0  
54 -shelve_time int(10)| unsigned |NO | 0  
55 -shelve_day |varchar(10)| YES |  
56 -cn_alphabet| varchar(255)| YES |  
57 -product_name| varchar(100) |YES |  
58 -brand_name_cn| varchar(50)| YES |  
59 -brand_name_en| varchar(100)| YES |  
60 -brand_keyword| varchar(200)| YES |  
61 -hot_keyword| varchar(100)| YES |  
62 -brand_name| varchar(50)| YES |  
63 -brand_alif| varchar(1)| YES |  
64 -style| varchar(200)| YES |  
65 -sales_phrase| varchar(100)| YES |  
66 -max_sort_id| smallint(5)| unsigned| NO| 0  
67 -max_sort_name| varchar(42)| YES |  
68 -max_sort| varchar(30) |YES |  
69 -middle_sort_id| smallint(5)| unsigned| NO | 0  
70 -middle_sort| varchar(30) |YES |  
71 -middle_sort_name| varchar(42)| YES |  
72 -small_sort_id| smallint(5) |unsigned| NO | 0  
73 -small_sort| varchar(30)| YES |  
74 -small_sort_name| varchar(42)| YES |  
75 -gender| enum('1','2','3')| YES |  
76 -gender_s| varchar(3)| YES |  
77 -brand_id| smallint(5)| unsigned| NO| 0  
78 -is_special| enum('Y','N')| YES | N|  
79 -status| tinyint(4)| NO | 0  
80 -seasons_s| int(0) |YES |  
81 -isspecial| int(1)| NO | 0|  
82 -is_hot |enum('Y','N')| YES | N|  
83 -folder_id| int(11) |YES | 0|  
84 -ishot| int(1)| NO | 0|  
85 -ispromotion| smallint(6)| NO | 0|  
86 -series_id| int(11)| unsigned| NO| 0|  
87 -is_sales| enum('Y','N')| YES | Y|  
88 -issales int(1)| NO ||| 0|  
89 -is_advance| enum('Y','N')| YES | N|  
90 -isadvance| int(1)| NO| 0||  
91 -is_auditing| enum('Y','N')| YES | Y||  
92 -isauditing| int(1)| NO | 0||  
93 -attribute| tinyint(4)| NO | |0|  
94 -seasons |set('spring','summer','autumn','winter','seasons')| YES |||  
95 -is_down| enum('Y','N')| YES | N||  
96 -isdown| int(1)| NO | 0||  
97 -isrecommend| int(1)| NO | 0|  
98 -is_outlets| int(1)| NO | 0|  
99 -first_shelve_time| int(10)| unsigned| YES | 0|  
100 -sell_channels| set('0','1','2','3','4','5','6','7','8','9')| YES | 0|  
101 -product_skn| int(11)| unsigned| NO |  
102 -isnew| varchar(1)| NO |  
103 -brand_domain| varchar(50) |YES |  
104 -islimited| varchar(1) |NO |  
105 -edit_time| int(10)| unsigned| NO | 0|  
106 -special_price| decimal(10,2)| YES | 0|  
107 -market_price| decimal(10,2)| YES | 0|  
108 -vip_discount_type| tinyint(4)| YES | 1|  
109 -vip_price |decimal(10,2)| YES | 0|  
110 -vip1_price| decimal(10,2)| YES | 0|  
111 -vip2_price| decimal(10,2)| YES | 0|  
112 -vip3_price |decimal(10,2)| YES | 0|  
113 -sales_price| decimal(10,2)| YES | 0|  
114 -promotion_discount_int| decimal(12,0)| YES |  
115 -promotion_discount| decimal(13,3)| YES |  
116 -specialoffer| varchar(1)| NO |  
117 -is_discount| varchar(1) |NO |  
118 -product_keyword| varchar(200)| YES |  
119 -color_ids |longtext |YES |  
120 -color_names |longtext| YES |  
121 -standard_ids |longtext |YES |  
122 -standard_names |longtext| YES |  
123 -standard_only_names |longtext |YES |  
124 -sales_num| decimal(33,0)| YES |  
125 -storage_num |decimal(33,0)| YES |  
126 -is_soon_sold_out| varchar(1) |NO |  
127 -is_sold_out| varchar(1)| NO |  
128 -sold_out| varchar(1)| NO |  
129 -size_ids |longtext| YES |  
130 -style_ids |longtext| YES |  
131 -goods_list| mediumtext |YES |  
132 -default_images| varchar(255)| YES |  
133 -activities |mediumtext |YES |  
134 -sort_weight| decimal(11,0)| NO | 0|  
135 -brand_weight| decimal(11,0)| NO | 0|  
136 -yohood_id| smallint(6)| YES |  
137 -base_pin_ratio |double| YES |  
138 -breaking_rate| double |YES |  
139 -discount_score| double |YES |  
140 -pool_id |longtext| YES |  
141 -  
142 -  
143 -  
144 -### 适配器设计  
145 -1 全球购商品融合到productindex  
146 -  
147 -(1)适配器通过调用全球购的url+key获取全球购商品,参考:  
148 -```sh  
149 -wget ${tbl.product.url}getproductscountforsearch?client_type=iphone&client_secret=xx  
150 -```  
151 -其中xx为客户端key,需要进行md5的转化,转化如下:  
152 -```sh  
153 -clientkey= MD5Util.string2MD5("client_type=iphone&private_key=" + ${tbl.product.private.key});  
154 - ${tbl.product.url}:全球购url ,可以找周硕要  
155 -${tbl.product.private.key}:全球购产品密钥  
156 -```  
157 -(2)获取全球购产品后,需要参考yoho商品productindex 封装成商品list。  
158 -```sh  
159 -List<ProductIndex> globalProducts = ProductAdaprotr.changed(List<tplproduct>);  
160 -```  
161 -(3)搜索这边会每隔一段时间(默认间隔为1个小时)获取globalProducts,之后会进行product_index的更新,这样全球购商品就能在product_index里面搜索得到。  
162 -  
163 -2 yoho部分商品(部分品牌下的商品)融合到全球购索引  
164 -商品适配模块需要支持逆向适配,其中:  
165 -(1)部分brand品牌下的商品需要按照全球购的字段转成全球购商品列表。  
166 -可直接从yh_shops库product表中根据brand查到对应的product,然后按照全球购的字段转成全球购的商品列表  
167 -```sh  
168 -List<product> = XXservice.getProduct(String brandname);  
169 -List<tplproduct> yohoProducts = ProductAdaprotr.changedfromProductIndex(List<product>);  
170 -```  
171 -(2)全球购对着部分商品列表进行存储计算。  
172 -(3)搜索引擎会定时从全球购获取商品列表,并进行tplproduct更新的操作。  
173 -  
174 -  
175 -  
176 - 1 +# 全球购Yoho商品搜索引擎融合方案
  2 +
  3 +目前全球购和yoho商品在搜索引擎中的索引是不同的,分别是tplproduct 和productindex。由于productindex的字段远远多于tplproduct的字段,所以整个融合过程会分为几个阶段,循序渐进来完成2个商品共用一个索引。
  4 +
  5 + - 适配模式。通过开发适配器,把全球购的字段转化成yoho商品的字段,全球购商品更新到productindex中
  6 +
  7 +
  8 +### Version
  9 +1.0.0
  10 +
  11 +### tplproduct字段定义
  12 +字段 | 说明
  13 +-----|-----
  14 +product_skn|商品skn
  15 +product_name|商品名称
  16 +source|商品来源
  17 +brand_id|品牌id
  18 +sort_one|一级品类id
  19 +sort_two|二级品类id
  20 +sort_three|三级品类id
  21 +sort_four|四级品类id
  22 +product_url|商品网址
  23 +site_id|网站id
  24 +is_limited|是否是限量商品
  25 +country_id|国家编码
  26 +gender|性别 1.男 2.女 3.通用
  27 +currency_id|货币id
  28 +tag_price|吊牌价
  29 +orign_price|销售价(计算汇率后的)
  30 +sell_price|最小销售价
  31 +goods_price|最小商品价格(计算汇率后的)
  32 +got_price|最小到手价
  33 +weight|重量
  34 +size_info|尺码
  35 +status|商品状态
  36 +url_status|爬虫状态 1.生效 2.失效
  37 +stock_status|库存状态 1.有 2.无
  38 +operate_userid|操作人id
  39 +order|排序序列
  40 +create_time|创建时间
  41 +update_time|更新时间
  42 +shelf_time|上架时间
  43 +offshelf_time|定时下架时间
  44 +auto_shelf|是否自动上架 1.自动 2.手动
  45 +color_ids|skc颜色id组合 (1,2,3)
  46 +skc|skc的集合
  47 +cover|商品封面图
  48 +
  49 +### productindex字段定义
  50 +字段 | 定义 | NULL| Key|DEFAULT
  51 +-----|-----|-----|----|-----
  52 +id |int(11)| unsigned| NO | 0
  53 +product_id |int(11) |unsigned |NO | 0
  54 +shelve_time int(10)| unsigned |NO | 0
  55 +shelve_day |varchar(10)| YES |
  56 +cn_alphabet| varchar(255)| YES |
  57 +product_name| varchar(100) |YES |
  58 +brand_name_cn| varchar(50)| YES |
  59 +brand_name_en| varchar(100)| YES |
  60 +brand_keyword| varchar(200)| YES |
  61 +hot_keyword| varchar(100)| YES |
  62 +brand_name| varchar(50)| YES |
  63 +brand_alif| varchar(1)| YES |
  64 +style| varchar(200)| YES |
  65 +sales_phrase| varchar(100)| YES |
  66 +max_sort_id| smallint(5)| unsigned| NO| 0
  67 +max_sort_name| varchar(42)| YES |
  68 +max_sort| varchar(30) |YES |
  69 +middle_sort_id| smallint(5)| unsigned| NO | 0
  70 +middle_sort| varchar(30) |YES |
  71 +middle_sort_name| varchar(42)| YES |
  72 +small_sort_id| smallint(5) |unsigned| NO | 0
  73 +small_sort| varchar(30)| YES |
  74 +small_sort_name| varchar(42)| YES |
  75 +gender| enum('1','2','3')| YES |
  76 +gender_s| varchar(3)| YES |
  77 +brand_id| smallint(5)| unsigned| NO| 0
  78 +is_special| enum('Y','N')| YES | N|
  79 +status| tinyint(4)| NO | 0
  80 +seasons_s| int(0) |YES |
  81 +isspecial| int(1)| NO | 0|
  82 +is_hot |enum('Y','N')| YES | N|
  83 +folder_id| int(11) |YES | 0|
  84 +ishot| int(1)| NO | 0|
  85 +ispromotion| smallint(6)| NO | 0|
  86 +series_id| int(11)| unsigned| NO| 0|
  87 +is_sales| enum('Y','N')| YES | Y|
  88 +issales int(1)| NO ||| 0|
  89 +is_advance| enum('Y','N')| YES | N|
  90 +isadvance| int(1)| NO| 0||
  91 +is_auditing| enum('Y','N')| YES | Y||
  92 +isauditing| int(1)| NO | 0||
  93 +attribute| tinyint(4)| NO | |0|
  94 +seasons |set('spring','summer','autumn','winter','seasons')| YES |||
  95 +is_down| enum('Y','N')| YES | N||
  96 +isdown| int(1)| NO | 0||
  97 +isrecommend| int(1)| NO | 0|
  98 +is_outlets| int(1)| NO | 0|
  99 +first_shelve_time| int(10)| unsigned| YES | 0|
  100 +sell_channels| set('0','1','2','3','4','5','6','7','8','9')| YES | 0|
  101 +product_skn| int(11)| unsigned| NO |
  102 +isnew| varchar(1)| NO |
  103 +brand_domain| varchar(50) |YES |
  104 +islimited| varchar(1) |NO |
  105 +edit_time| int(10)| unsigned| NO | 0|
  106 +special_price| decimal(10,2)| YES | 0|
  107 +market_price| decimal(10,2)| YES | 0|
  108 +vip_discount_type| tinyint(4)| YES | 1|
  109 +vip_price |decimal(10,2)| YES | 0|
  110 +vip1_price| decimal(10,2)| YES | 0|
  111 +vip2_price| decimal(10,2)| YES | 0|
  112 +vip3_price |decimal(10,2)| YES | 0|
  113 +sales_price| decimal(10,2)| YES | 0|
  114 +promotion_discount_int| decimal(12,0)| YES |
  115 +promotion_discount| decimal(13,3)| YES |
  116 +specialoffer| varchar(1)| NO |
  117 +is_discount| varchar(1) |NO |
  118 +product_keyword| varchar(200)| YES |
  119 +color_ids |longtext |YES |
  120 +color_names |longtext| YES |
  121 +standard_ids |longtext |YES |
  122 +standard_names |longtext| YES |
  123 +standard_only_names |longtext |YES |
  124 +sales_num| decimal(33,0)| YES |
  125 +storage_num |decimal(33,0)| YES |
  126 +is_soon_sold_out| varchar(1) |NO |
  127 +is_sold_out| varchar(1)| NO |
  128 +sold_out| varchar(1)| NO |
  129 +size_ids |longtext| YES |
  130 +style_ids |longtext| YES |
  131 +goods_list| mediumtext |YES |
  132 +default_images| varchar(255)| YES |
  133 +activities |mediumtext |YES |
  134 +sort_weight| decimal(11,0)| NO | 0|
  135 +brand_weight| decimal(11,0)| NO | 0|
  136 +yohood_id| smallint(6)| YES |
  137 +base_pin_ratio |double| YES |
  138 +breaking_rate| double |YES |
  139 +discount_score| double |YES |
  140 +pool_id |longtext| YES |
  141 +
  142 +
  143 +
  144 +### 适配器设计
  145 +1 全球购商品融合到productindex
  146 +
  147 +(1)适配器通过调用全球购的url+key获取全球购商品,参考:
  148 +```sh
  149 +wget ${tbl.product.url}getproductscountforsearch?client_type=iphone&client_secret=xx
  150 +```
  151 +其中xx为客户端key,需要进行md5的转化,转化如下:
  152 +```sh
  153 +clientkey= MD5Util.string2MD5("client_type=iphone&private_key=" + ${tbl.product.private.key});
  154 + ${tbl.product.url}:全球购url ,可以找周硕要
  155 +${tbl.product.private.key}:全球购产品密钥
  156 +```
  157 +(2)获取全球购产品后,需要参考yoho商品productindex 封装成商品list。
  158 +```sh
  159 +List<ProductIndex> globalProducts = ProductAdaprotr.changed(List<tplproduct>);
  160 +```
  161 +(3)搜索这边会每隔一段时间(默认间隔为1个小时)获取globalProducts,之后会进行product_index的更新,这样全球购商品就能在product_index里面搜索得到。
  162 +
  163 +2 yoho部分商品(部分品牌下的商品)融合到全球购索引
  164 +商品适配模块需要支持逆向适配,其中:
  165 +(1)部分brand品牌下的商品需要按照全球购的字段转成全球购商品列表。
  166 +可直接从yh_shops库product表中根据brand查到对应的product,然后按照全球购的字段转成全球购的商品列表
  167 +```sh
  168 +List<product> = XXservice.getProduct(String brandname);
  169 +List<tplproduct> yohoProducts = ProductAdaprotr.changedfromProductIndex(List<product>);
  170 +```
  171 +(2)全球购对着部分商品列表进行存储计算。
  172 +(3)搜索引擎会定时从全球购获取商品列表,并进行tplproduct更新的操作。
  173 +
  174 +
  175 +
  176 +