getDetail.md 3.14 KB

获取资讯详情接口

接口名: /guang/article/getDetail

方法

POST JSONRAW

入参


属性名称 类型 例子 说明
id int 3 资讯id

对应SQL的操作库表

  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from article
    where id = #{id,jdbcType=INTEGER}
  </select>

  <select id="selectByArticleId" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from article_block
    where article_id = #{articleId,jdbcType=INTEGER} order by order_by ASC, id ASC
  </select>

  <select id="selectByArticleId" parameterType="java.lang.Integer" resultMap="BaseResultMap" >
    select 
    <include refid="Base_Column_List" />
    from article_brand_relation
    where article_id = #{articleId,jdbcType=INTEGER} order by order_by ASC
  </select>

错误编码


错误码code 消息 说明
200 操作成功
400 资讯ID不能为空!
402 无相关资讯记录!

返回

{
    "code": 200,
    "data": {
        "adsImgSize": "1088680",
        "articleGender": "3",
        "articleSummary": "依稀记得上初中那会,谁要有一件胸口带“钩子”的衣服,那他/她走路一定昂首挺胸,生怕别人看不见一样!",
        "articleTitle": "会动的的免费广告!",
        "articleType": 1,
        "authorId": 521285,
        "authorName": "Milk",
        "brandList": [
            {
                "brandCategory": "1",
                "brandIco": "http://img11.static.yhbimg.com/brandLogo/2015/09/02/15/01df4589ec2163be3a9f7a61d7f8ea3cd9.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/80",
                "brandName": "55°",
                "id": 886
            },
            {
                "brandCategory": "1",
                "brandIco": "http://img13.static.yhbimg.com/brandLogo/2016/03/01/06/024a32e5a272fdeb37e97a645f18b5541c.png?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/80",
                "brandName": "5CM",
                "id": 4
            }
        ],
        "browse": 39822,
        "coverImage": "http://img10.static.yhbimg.com/yhb-img01/2015/05/20/20/017f40fe5be35c9e1412cd8e2164c87e83.jpg?imageView/{mode}/w/{width}/h/{height}",
        "coverImageType": 1,
        "createTime": 1432124223,
        "id": 3,
        "isRecommend": 0,
        "maxSortId": 2,
        "maxSortName": "搭配",
        "minSortId": 0,
        "praise": 28,
        "publishState": 1,
        "publishTime": 1459267200,
        "status": 1,
        "tag": "王俊凯,吴亦凡",
        "updateTime": 1460517913,
        "url": "{\"action\":\"go.mine\",\"url\":\"asdasdas\"}"
    },
    "message": "操作成功"
}