ShareBrandController根据品牌关系id,获取品牌详情
Showing
1 changed file
with
36 additions
and
0 deletions
业务分享/逛的业务流分享/ShareBrandController_AP3.md
0 → 100644
1 | +# ShareBrandController根据品牌关系id,获取品牌详情# | ||
2 | +**方法:getBrandInfo()** | ||
3 | + | ||
4 | +**请求参数** | ||
5 | + <table> | ||
6 | + <tr><th>参数名称</th><th>参数类型</th><th>可否为空</th><th>示例</th><th>默认值</th><th>备注</th></tr> | ||
7 | + <tr><td>id</td><td>string</td><td>否</td><td>1</td><td></td><td>品牌关系id</td></tr> | ||
8 | + | ||
9 | + </table> | ||
10 | + | ||
11 | +**实现逻辑:** | ||
12 | + | ||
13 | +1、ShareBrandController.getBrandInfo()方法中调用sns.guang.getBrandInfo服务; | ||
14 | + | ||
15 | +2、对参数id进行校验,若值小于1,则抛出id为空异常; | ||
16 | + | ||
17 | +3、根据id查询数据库表brand_relation,查询是否存在该id号的品牌关系,若不存在则抛出异常; | ||
18 | + | ||
19 | +4、根据品牌关系调用Product接口查询具体品牌信息; | ||
20 | + | ||
21 | +5、查询数据库表plustar_category,获取Status为1的品牌类型记录; | ||
22 | + | ||
23 | +6、拼装品牌关系列表、品牌信息与品牌类型,构造返回对象PlustarBrandInfoRespBO. | ||
24 | + | ||
25 | +**示例:** | ||
26 | +请求: | ||
27 | + http://localhost:8080/gateway/guang/api/*/plustar/getbrandinfo?id=1&debug=XYZ | ||
28 | + | ||
29 | + | ||
30 | +返回: | ||
31 | + | ||
32 | + { | ||
33 | + "code": 500, | ||
34 | + "message": "Not found the brand relation" | ||
35 | + } | ||
36 | + |
-
Please register or login to post a comment