querySCById.md
9.95 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,11,0,0",
"categoryId": "11",
"categoryName": "鞋靴",
"createTime": "1441117882",
"icon": "http://img11.static.yhbimg.com/taobaocms/2015/09/01/14/01a4c4324531f3e0c857e5605410110baa.jpg",
"levelNumber": "2",
"orderBy": "8",
"parentId": "1",
"parentSC": [
{
"categoryCode": "1,0,0,0",
"categoryId": "1",
"categoryName": "男生",
"createTime": "1441117726",
"icon": "",
"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": "147,149,148,151,231",
"relationProductSort": [
{
"createTime": "0",
"gender": "3",
"id": "147",
"isHot": "N",
"orderBy": "20",
"parentId": "44",
"parentPS": {
"createTime": "0",
"gender": "3",
"id": "44",
"isHot": "N",
"orderBy": "22",
"parentId": "6",
"parentPS": {
"createTime": "0",
"gender": "3",
"id": "6",
"isHot": "N",
"orderBy": "70",
"parentId": "0",
"sortCode": "6,0,0",
"sortInitials": "x",
"sortLevel": "1",
"sortName": "鞋靴",
"status": "1",
"updateTime": "1456123790"
},
"sortCode": "6,44,0",
"sortInitials": "xxx",
"sortLevel": "2",
"sortName": "休闲/运动鞋",
"status": "1",
"updateTime": "0"
},
"sortCode": "6,44,147",
"sortLevel": "3",
"sortName": "休闲/运动鞋",
"status": "1",
"updateTime": "0"
},
{
"createTime": "0",
"gender": "3",
"id": "149",
"isHot": "N",
"orderBy": "16",
"parentId": "46",
"parentPS": {
"createTime": "0",
"gender": "3",
"id": "46",
"isHot": "N",
"orderBy": "15",
"parentId": "6",
"parentPS": {
"createTime": "0",
"gender": "3",
"id": "6",
"isHot": "N",
"orderBy": "70",
"parentId": "0",
"sortCode": "6,0,0",
"sortInitials": "x",
"sortLevel": "1",
"sortName": "鞋靴",
"status": "1",
"updateTime": "1456123790"
},
"sortCode": "6,46,0",
"sortInitials": "lx",
"sortLevel": "2",
"sortName": "凉鞋/凉拖",
"status": "1",
"updateTime": "0"
},
"sortCode": "6,46,149",
"sortLevel": "3",
"sortName": "凉鞋/凉拖",
"status": "1",
"updateTime": "0"
},
{
"createTime": "0",
"gender": "3",
"id": "148",
"isHot": "N",
"orderBy": "19",
"parentId": "45",
"parentPS": {
"createTime": "0",
"gender": "3",
"id": "45",
"isHot": "N",
"orderBy": "20",
"parentId": "6",
"parentPS": {
"createTime": "0",
"gender": "3",
"id": "6",
"isHot": "N",
"orderBy": "70",
"parentId": "0",
"sortCode": "6,0,0",
"sortInitials": "x",
"sortLevel": "1",
"sortName": "鞋靴",
"status": "1",
"updateTime": "1456123790"
},
"sortCode": "6,45,0",
"sortInitials": "xz",
"sortLevel": "2",
"sortName": "靴子",
"status": "1",
"updateTime": "0"
},
"sortCode": "6,45,148",
"sortLevel": "3",
"sortName": "靴子",
"status": "1",
"updateTime": "0"
},
{
"createTime": "0",
"gender": "3",
"id": "151",
"isHot": "N",
"orderBy": "17",
"parentId": "48",
"parentPS": {
"createTime": "0",
"gender": "3",
"id": "48",
"isHot": "N",
"orderBy": "18",
"parentId": "6",
"parentPS": {
"createTime": "0",
"gender": "3",
"id": "6",
"isHot": "N",
"orderBy": "70",
"parentId": "0",
"sortCode": "6,0,0",
"sortInitials": "x",
"sortLevel": "1",
"sortName": "鞋靴",
"status": "1",
"updateTime": "1456123790"
},
"sortCode": "6,48,0",
"sortInitials": "szx",
"sortLevel": "2",
"sortName": "时装鞋",
"status": "1",
"updateTime": "0"
},
"sortCode": "6,48,151",
"sortLevel": "3",
"sortName": "时装鞋",
"status": "1",
"updateTime": "0"
},
{
"createTime": "0",
"gender": "3",
"id": "231",
"isHot": "N",
"orderBy": "14",
"parentId": "230",
"parentPS": {
"createTime": "0",
"gender": "3",
"id": "230",
"isHot": "N",
"orderBy": "14",
"parentId": "6",
"parentPS": {
"createTime": "0",
"gender": "3",
"id": "6",
"isHot": "N",
"orderBy": "70",
"parentId": "0",
"sortCode": "6,0,0",
"sortInitials": "x",
"sortLevel": "1",
"sortName": "鞋靴",
"status": "1",
"updateTime": "1456123790"
},
"sortCode": "6,230,0",
"sortLevel": "2",
"sortName": "保养护理",
"status": "1",
"updateTime": "0"
},
"sortCode": "6,230,231",
"sortLevel": "3",
"sortName": "保养护理",
"status": "1",
"updateTime": "0"
}
],
"relationUrl": "",
"state": "0"
},
"md5": "1f4e35128db06566f474c6978178a219",
"message": "querySCById success"
}