querySCById.md 5.41 KB

根据销售类目的id查询销售类目接口

接口名: /salesCategory/querySCById

方法

POST JSONRAW

入参


属性名称 类型 例子 说明 是否必填 长度限制
categoryId String 59 销售类目id 5

对应SQL的操作库表

    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
        select
        <include refid="Base_Column_List" />
        from sales_category
        where category_id = #{categoryId,jdbcType=INTEGER}
    </select>
<select id="selectListByIDSWhenDefaultStatus" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from product_sort
    where 
    status=1 and
    id in 
    <foreach collection="sortIdList" item="item" index="index" separator="," open="(" close=")">
        #{item, jdbcType=SMALLINT}
    </foreach>
  </select>

响应码


响应码code 消息 说明
200 querySCById success
400 销售类目ID不能为空

返回

{
    "code": 200,
    "data": {
        "categoryCode": "1,5,45,0",
        "categoryId": "45",
        "categoryName": "T恤",
        "createTime": "1441118277",
        "icon": "",
        "levelNumber": "3",
        "orderBy": "5",
        "parentId": "5",
        "parentSC": [
            {
                "categoryCode": "1,0,0,0",
                "categoryId": "1",
                "categoryName": "男生",
                "createTime": "1441117726",
                "icon": "",
                "items": [
                    {
                        "categoryCode": "1,5,0,0",
                        "categoryId": "5",
                        "categoryName": "上衣",
                        "createTime": "1441117792",
                        "icon": "http://img11.static.yhbimg.com/taobaocms/2015/09/01/14/01d48022e08742f1c96766caa6484593ce.jpg?imageView/{mode}/w/{width}/h/{height}",
                        "levelNumber": "2",
                        "orderBy": "10",
                        "parentId": "1",
                        "relationParameter": "114,293,116,117,115,119,124,122,413,258,173,227,125,118,121,123",
                        "relationUrl": "",
                        "state": "0"
                    }
                ],
                "levelNumber": "1",
                "orderBy": "0",
                "parentId": "0",
                "relationParameter": "114,293,116,117,115,119,124,122,131,129,346,133,348,147,149,148,151,231,152,153,196,238,239,240,349,157,342,156,161,300,160,233,341,340,210,339,351,186,235,163,224,322,323,324,325,326,327,328,329,330,331,72,74,75,76,142,77,78,79,80,199,213,217,218,234,303,305,306,307,334,162,316,164,317,295,321,311,357,359,320,195,197,413,130,258,173,227,125,118,121,123,263,260,264,261,352",
                "relationUrl": "",
                "state": "0"
            }
        ],
        "relationParameter": "114,293",
        "relationProductSort": [
            {
                "createTime": 0,
                "gender": 3,
                "id": 1,
                "isHot": "N",
                "items": [
                    {
                        "createTime": 0,
                        "gender": 3,
                        "id": 11,
                        "isHot": "N",
                        "items": [
                            {
                                "createTime": 0,
                                "gender": 3,
                                "id": 114,
                                "isHot": "N",
                                "orderBy": 12,
                                "parentId": 11,
                                "sortCode": "1,11,114",
                                "sortLevel": 3,
                                "sortName": "T恤",
                                "status": 1,
                                "updateTime": 0
                            },
                            {
                                "createTime": 0,
                                "gender": 3,
                                "id": 293,
                                "isHot": "N",
                                "orderBy": 0,
                                "parentId": 11,
                                "sortCode": "1,11,293",
                                "sortInitials": "cxtx",
                                "sortLevel": 3,
                                "sortName": "长袖T恤",
                                "status": 1,
                                "updateTime": 0
                            }
                        ],
                        "orderBy": 8,
                        "parentId": 1,
                        "sortCode": "1,11,0",
                        "sortInitials": "tx",
                        "sortLevel": 2,
                        "sortName": "T恤",
                        "status": 1,
                        "updateTime": 1458048766
                    }
                ],
                "orderBy": 100,
                "parentId": 0,
                "sortCode": "1,0,0",
                "sortInitials": "sy",
                "sortLevel": 1,
                "sortName": "上衣",
                "status": 1,
                "updateTime": 1453802272
            }
        ],
        "relationUrl": "",
        "state": "0"
    },
    "md5": "5336e9aad255923dc684de32719ded0b",
    "message": "querySCById success"
}