getList.md 1.8 KB

查询品牌关注

接口名: /guang/relationship/getList

方法

POST

入参


属性名称 类型 例子 说明 是否必填 长度
brandId Integer 232 品牌ID 1-11

对应SQL的操作库表

<select id="selectCountByBrandId" resultType="java.lang.Integer" >
    select 
    IFNULL(count(1),0)
    from brand_relationship
    <where>
        <if test="brandId != null">
            brand_id = #{brandId,jdbcType=INTEGER}
        </if>
    </where>
</select>

<select id="selectListByBrandId" resultMap="BaseResultMap" >
    select 
    <include refid="Base_Column_List" />
    from brand_relationship
    <where>
        <if test="brandId != null">
            brand_id = #{brandId,jdbcType=INTEGER}
        </if>
    </where>
    order by create_time DESC limit #{offset},#{size}
</select>

错误编码


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

返回

json

{
    "code": 200,
    "data": [
        {
            "brandId": "1",
            "brandType":"2",
            "brandName":"addicc",
            "activityName":"双11",
            "discount":"3"
        },
        {
            "brandId": "2",
            "brandType":"2",
            "brandName":"addicc",
            "activityName":"双11",
            "discount":"3"
        },
       {
            "brandId": "3",
            "brandType":"2",
            "brandName":"addicc",
            "activityName":"双11",
            "discount":"3"
        }
    ]
}