Authored by wangning

ArticleBrandController根据品牌获取文章信息

  1 +# ArticleBrandController根据品牌获取文章信息 #
  2 +## 1. getArticleByBrand方法 ##
  3 +
  4 + - 参数:brand_id品牌id
  5 + client_type客户端类型
  6 + limit查询文章条数
  7 + udid点赞用户
  8 +
  9 +
  10 + - 方法解释:获取某品牌下的文章信息
  11 +
  12 + - 实现逻辑:
  13 +
  14 + 1.进入ArticleBrandController.getArticleByBrand方法,调用sns.getArticleByBrand服务
  15 +
  16 + 2.对参数brand_id进行非空和是否大于0校验,参数limit如果小于0取3
  17 +
  18 + 3.根据brandId查询表yh_guang.article_brand_relation获取该品牌下的文章articleIds
  19 +
  20 + 4.根据articleIds查询表yh_guang.article获取文章具体信息articles
  21 +
  22 + 5.根据udid和articleIds查询表yh_guang.article_praise获取文章的点赞列表
  23 +
  24 + 6.封装数据并返回
  25 +
  26 + - 示例:
  27 +请求:http://localhost:8080/gateway/guang/service/*/author/getAuthor?author_id=380463&client_type=h5&debug=XYZ
  28 +
  29 +返回:{"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"}