|
|
# ArticleBrandController根据品牌获取文章信息 #
|
|
|
## 1. getArticleByBrand方法 ##
|
|
|
|
|
|
- 参数:brand_id品牌id
|
|
|
client_type客户端类型
|
|
|
limit查询文章条数
|
|
|
udid点赞用户
|
|
|
|
|
|
|
|
|
- 方法解释:获取某品牌下的文章信息
|
|
|
|
|
|
- 实现逻辑:
|
|
|
|
|
|
1.进入ArticleBrandController.getArticleByBrand方法,调用sns.getArticleByBrand服务
|
|
|
|
|
|
2.对参数brand_id进行非空和是否大于0校验,参数limit如果小于0取3
|
|
|
|
|
|
3.根据brandId查询表yh_guang.article_brand_relation获取该品牌下的文章articleIds
|
|
|
|
|
|
4.根据articleIds查询表yh_guang.article获取文章具体信息articles
|
|
|
|
|
|
5.根据udid和articleIds查询表yh_guang.article_praise获取文章的点赞列表
|
|
|
|
|
|
6.封装数据并返回
|
|
|
|
|
|
- 示例:
|
|
|
请求:http://localhost:8080/gateway/guang/service/*/author/getAuthor?author_id=380463&client_type=h5&debug=XYZ
|
|
|
|
|
|
返回:{"alg":"SALT_MD5","code":200,"data":{"author_desc":"Because i'm fierce,bitch!","avatar":"http://img12.static.yhbimg.com/yhb-img02/2015/06/12/12/02aafe4efc368f307c02b692cf1f862570.jpg?imageView/0/w/100/h/100","name":"uncle-sam","url":"http://guang.m.yohobuy.com/author/index?id=380463"},"md5":"48e694554ff8e252f7ff59ab09435c83","message":"author info"} |
|
|
\ No newline at end of file |
...
|
...
|
|