Showing
1 changed file
with
0 additions
and
51 deletions
1 | -# ShareBrandController根据品牌关系id,获取品牌详情# | ||
2 | -**方法:getBrandInfo()** | ||
3 | - | ||
4 | -**请求参数** | ||
5 | - | ||
6 | -| 参数名称 | 参数类型 | 可否为空 |示例 |默认值 |备注 | | ||
7 | -| ---------|:--------:| --------:|-----:|------:|-----:| | ||
8 | -|id|string | 否 |121 |- |品牌关系id| | ||
9 | - | ||
10 | - | ||
11 | -**实现逻辑:** | ||
12 | - | ||
13 | -1、ShareBrandController.getBrandInfo()方法中调用sns.getBrandInfo服务; | ||
14 | - | ||
15 | -2、对参数id进行校验,若值小于1,则抛出id为空异常; | ||
16 | - | ||
17 | -3、根据id查询数据库表brand_relation,查询是否存在该id号的品牌关系,若不存在则抛出异常;若存在,则返回品牌id列表; | ||
18 | - | ||
19 | -4、根据品牌id列表调用product.queryBrandByIds()接口查询具体品牌信息; | ||
20 | - | ||
21 | -5、查询数据库表plustar_category,获取Status为1的品牌类型记录; | ||
22 | - | ||
23 | -6、拼装品牌关系列表、品牌信息与品牌类型,构造返回对象PlustarBrandInfoRespBO. | ||
24 | - | ||
25 | -**示例:** | ||
26 | -请求: | ||
27 | - http://localhost:8080/gateway/guang/api/*/plustar/getbrandinfo?id=121&debug=XYZ | ||
28 | - | ||
29 | - | ||
30 | -返回: | ||
31 | - | ||
32 | - { | ||
33 | - "alg": "SALT_MD5", | ||
34 | - "code": 200, | ||
35 | - "data": { | ||
36 | - "brand_domain": "xgirl", | ||
37 | - "brand_ico": "/2015/12/09/14/01f9101ac1a25cfa5dfc526d0b3c54facf.jpg", | ||
38 | - "brand_id": 554, | ||
39 | - "brand_intro": "X-GIRL自1994年成立,由Sonic Youth乐队主唱兼贝斯手Kim\nGordon一手创建,作为X-Large的女性分支品牌踩入街牌行列,作为日系休闲服装的一大亮点,极具传奇色彩。自信、独立,而且骨子里更带点前卫反叛的个性,令一群惺惺相惜的潮流少女们纷纷“捧场”。X-GIRL一直以来走着甜美少女味,一望即知是日本热情而又随性的小女生典范。款式简约,而色彩和图案则作为点睛之笔存在得举足轻重,广受热爱Casual\nWear的女生欢迎。<p><img border=\"0\" src=\n\"http://img02.static.yohobuy.com/brandContentImg/2014/09/17/10/022e552896b0412451e87fef33fbb02de7.jpg\" /></p>\n<p><img border=\"0\" src=\n\"http://img01.static.yohobuy.com/brandContentImg/2014/09/17/10/01ae874e679ba9561af96bdde0a6dd21f0.jpg\" /></p>\n<p><img border=\"0\" src=\n\"http://img01.static.yohobuy.com/brandContentImg/2014/09/17/10/01c82c7487b13833422fc26870e0107541.jpg\" /></p>\n<p><img border=\"0\" src=\n\"http://img02.static.yohobuy.com/brandContentImg/2014/09/17/10/02862090922c14ad387d8a929cd16ef7ee.jpg\" /></p>\n<p><img border=\"0\" src=\n\"http://img02.static.yohobuy.com/brandContentImg/2014/09/17/10/0235da76a2ffbb1f5323f80a95cc795e13.jpg\" /></p>\n<p><img border=\"0\" src=\n\"http://img02.static.yohobuy.com/brandContentImg/2014/09/17/10/02dce1467d2d2709827d8a8781d0154637.jpg\" /></p>\n<p><img border=\"0\" src=\n\"http://img01.static.yohobuy.com/brandContentImg/2014/09/17/10/01a1c133e35645e38e6eaeb39fda752322.jpg\" /></p>\n<p><img border=\"0\" src=\n\"http://img01.static.yohobuy.com/brandContentImg/2014/09/17/10/015a1b5759872a6f880838e7a5d23754f9.jpg\" /></p>\n", | ||
40 | - "brand_name": "X-GIRL", | ||
41 | - "brand_type": 0, | ||
42 | - "brand_type_name": "潮流经典", | ||
43 | - "cover_img": "http://img12.static.yhbimg.com/yhb-img01/2015/10/15/09/026a8bbe4d45c1b25339fac25a645106fe.jpg?imageView/{mode}/w/{width}/h/{height}", | ||
44 | - "id": 121, | ||
45 | - "is_different": 1, | ||
46 | - "is_recommend": 2, | ||
47 | - "status": 1 | ||
48 | - }, | ||
49 | - "md5": "6a191dfefb3ec8f230e71d472968b8ba", | ||
50 | - "message": "品牌详情" | ||
51 | - } |
-
Please register or login to post a comment