ShareBrandController获取分享品牌详情服务
Showing
1 changed file
with
33 additions
and
0 deletions
业务分享/逛的业务流分享/ShareBrandController_API1.md
0 → 100644
1 | +# ShareBrandController获取分享品牌详情服务 # | ||
2 | +**方法:getShareBrandInfo()** | ||
3 | + | ||
4 | +**请求参数** | ||
5 | + | ||
6 | + <table> | ||
7 | + <tr><th>参数名称</th><th>参数类型</th><th>可否为空</th><th>示例</th><th>默认值</th><th>备注</th></tr> | ||
8 | + <tr><td>id</td><td>int</td><td>否</td><td>5</td><td>0</td><td>id</td></tr> | ||
9 | + </table> | ||
10 | + | ||
11 | +**实现逻辑:** | ||
12 | + | ||
13 | +1、ShareBrandController.getShareBrandInfo()方法中调用sns.guang.getShareBrandInfo服务; | ||
14 | + | ||
15 | +2、对参数id进行校验,若值小于1,则抛出分享品牌详情id为空异常; | ||
16 | + | ||
17 | +3、根据id查询数据库表brand_relation,获取该id对应品牌相关信息,BrandRelation对象,从该BrandRelation对象中获取对应的品牌id值brand\_id; | ||
18 | + | ||
19 | +4、通过该brand\_id作为参数调用product接口获取该品牌的详细产品信息,得到BrandBo对象. | ||
20 | + | ||
21 | +5、组合查询到的品牌信息与品牌产品详细信息,返回封装的ShareBrandRspBO对象. | ||
22 | + | ||
23 | +**示例:** | ||
24 | +请求: | ||
25 | + http://localhost:8080/gateway/guang/api/*/share/brandinfo?id=5&debug=XYZ | ||
26 | + | ||
27 | + | ||
28 | +返回: | ||
29 | + | ||
30 | + { | ||
31 | + "code": 500, | ||
32 | + "message": "Not found the brand relation" | ||
33 | + } |
-
Please register or login to post a comment