getList.md 3.24 KB

plustar分类列表查询

接口名: '/guang/plustar/getList'

方法

POST JSONRAW

入参


属性名称 类型 例子 说明 是否必填 范围
brandType String 1 频道id
status String 1 品牌状态
brandId String 432 品牌id
gender String 1 性别

对应SQL的操作库表

  <select id="selectCountByCond" resultType="java.lang.Integer" >
    select 
     ifnull(count(1),0)
    from brand_relation where 1 = 1
    <if test="brandRel.brandId != null">
        and brand_id = #{brandRel.brandId}
    </if>
    <if test="brandRel.brandType != null">
        and brand_type = #{brandRel.brandType}
    </if>
    <if test="brandRel.status != null">
        and status = #{brandRel.status}
    </if>
    <if test='brandRel.gender == "1"'>
        and gender in ('1','3')
    </if>
    <if test='brandRel.gender == "2"'>
        and gender in ('2','3')
    </if>
    <if test='brandRel.gender == "3"'>
        and gender = '3'
    </if>
  </select>
  <select id="selectByCond" resultMap="BaseResultMap" >
    select 
    <include refid="Base_Column_List" />
    from brand_relation where 1 = 1
    <if test="brandRel.brandId != null">
        and brand_id = #{brandRel.brandId}
    </if>
    <if test="brandRel.brandType != null">
        and brand_type = #{brandRel.brandType}
    </if>
    <if test="brandRel.status != null">
        and status = #{brandRel.status}
    </if>
    <if test="brandRel.gender == '1'">
        and gender in ('1','3')
    </if>
    <if test="brandRel.gender == '2'">
        and gender in ('2','3')
    </if>
    <if test="brandRel.gender == '3'">
        and gender = '3'
    </if>
    limit #{offset},#{size}
  </select>

错误编码


错误码code 消息 说明
200 操作成功

返回

{
    "code":200,
    "message":"操作成功",
    "data": {
        "list": [
            {
                "id": "57",      
                "bannerTitle": "纯粹纽约街头风格,纯粹纽约态度!", //banner标题
                "brandId": "432",                                  //品牌id
                "brandName":"Married to the MOB",                  //品牌名称
                "brandType": "1",                                  //品牌类型
                "categoryName": "潮流经典",                        //频道名称
                "coverImg":"http://img10.static.yhbimg.com/yhb-img01/2015/05/21/21/016ebe9a51caff7fd634243f8063cfcf97.jpg?imageView/{mode}/w/{width}/h/{height}",//封面图
                "gender": "3",                                     //性别 1.男2.女3.通用
                "isDifferent": "2",                                //是否区分男女 1区分 2不区分
                "isRecommend": "2",                                //是否推荐 1推荐 2不推荐
                "orderBy": "2",                                    //排序
                "status": "1",                                     //是否可用 1可用 2不可用
                "updateTime": 1449563008                           //修改时间
            }
        ],
        "page": 1,
        "size": 10,
        "total": 169,
        "totalPage": 17
    }
}