|
|
# 查询资讯分类资源
|
|
|
|
|
|
> 接口名: `/guang/article/sort/getList
|
|
|
> 接口名: `/guang/article/sort/addSort
|
|
|
|
|
|
### 方法
|
|
|
|
|
|
> GET
|
|
|
|
|
|
### 无参
|
|
|
> POST
|
|
|
|
|
|
### 入参
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|
|
|
|
|--------|----|----|----|
|
|
|
|parent_id|Integer|1|父类分类|
|
|
|
|name|String|流行|分类名称|
|
|
|
|status|Byte|1|状态|
|
|
|
|orderBy|Byte|3|排序|
|
|
|
|advertCode|String|324dfasf|广告码|
|
|
|
---------------------
|
|
|
|
|
|
|
|
|
### 对应SQL的操作库表
|
|
|
|
|
|
```xml
|
|
|
<select id="selectAllSortList" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from article_sort
|
|
|
order by order_by DESC
|
|
|
</select>
|
|
|
```<insert id="insertSelective" parameterType="com.yohobuy.platform.dal.guang.model.ArticleSort">
|
|
|
insert into article_sort
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
id,
|
|
|
</if>
|
|
|
<if test="parentId != null">
|
|
|
parent_id,
|
|
|
</if>
|
|
|
<if test="name != null">
|
|
|
name,
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
status,
|
|
|
</if>
|
|
|
<if test="orderBy != null">
|
|
|
order_by,
|
|
|
</if>
|
|
|
<if test="advertCode != null">
|
|
|
advert_code,
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
create_time,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
#{id,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="parentId != null">
|
|
|
#{parentId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="name != null">
|
|
|
#{name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
#{status,jdbcType=TINYINT},
|
|
|
</if>
|
|
|
<if test="orderBy != null">
|
|
|
#{orderBy,jdbcType=TINYINT},
|
|
|
</if>
|
|
|
<if test="advertCode != null">
|
|
|
#{advertCode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
#{createTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
```
|
|
|
|
|
|
### 错误编码
|
...
|
...
|
@@ -26,47 +76,16 @@ |
|
|
-------------------------
|
|
|
|错误码code|消息|说明|
|
|
|
|--------|----|----|
|
|
|
|200|操作成功| |
|
|
|
|200|添加成功| |
|
|
|
|400|添加失败| |
|
|
|
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code": 200,
|
|
|
"data": [
|
|
|
{
|
|
|
"id": "1",
|
|
|
"orderBy": "1",
|
|
|
"status":"1"
|
|
|
"name":"推荐"
|
|
|
},
|
|
|
{
|
|
|
"id": "2",
|
|
|
"orderBy": "2",
|
|
|
"status":"1"
|
|
|
"name":"搭配"
|
|
|
},
|
|
|
{
|
|
|
"id": "3",
|
|
|
"orderBy": "3",
|
|
|
"status":"1"
|
|
|
"name":"潮人"
|
|
|
},
|
|
|
{
|
|
|
"id": "4",
|
|
|
"orderBy": "4",
|
|
|
"status":"1"
|
|
|
"name":"潮品"
|
|
|
},
|
|
|
{
|
|
|
"id": "5",
|
|
|
"orderBy": "5",
|
|
|
"status":"1"
|
|
|
"name":"专题"
|
|
|
}
|
|
|
],
|
|
|
md5=3be40e83baf090a2ea799d9ece2ee199,
|
|
|
message=分类列表
|
|
|
"message":分类列表
|
|
|
}
|
|
|
|
|
|
``` |
...
|
...
|
|