|
|
# 查询资讯标签
|
|
|
|
|
|
> 接口名: `/guang/tags/getList
|
|
|
|
|
|
### 方法
|
|
|
|
|
|
> GET
|
|
|
|
|
|
### 无参
|
|
|
|
|
|
|
|
|
|
|
|
### 对应SQL的操作库表
|
|
|
|
|
|
```
|
|
|
<select id="selectTagsCount" resultType="java.lang.Integer" >
|
|
|
select
|
|
|
IFNULL(count(1),0)
|
|
|
from article_tags where 1 = 1
|
|
|
<if test="tagName != null and tagName != ''" >
|
|
|
and tag_name like concat('%', #{tagName, jdbcType=VARCHAR}, '%')
|
|
|
</if>
|
|
|
<if test="classifyId != null and classifyId != ''" >
|
|
|
and classify_id = #{classifyId,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="isHot != null and isHot != ''" >
|
|
|
and is_hot = #{isHot,jdbcType=TINYINT}
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectByNameAndClassifyAndHot" resultMap="BaseResultMap" >
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from article_tags where 1 = 1
|
|
|
<if test="tagName != null and tagName != ''" >
|
|
|
and tag_name like concat('%', #{tagName, jdbcType=VARCHAR}, '%')
|
|
|
</if>
|
|
|
<if test="classifyId != null and classifyId != ''" >
|
|
|
and classify_id = #{classifyId,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="isHot != null and isHot != ''" >
|
|
|
and is_hot = #{isHot,jdbcType=TINYINT}
|
|
|
</if>
|
|
|
order by id desc
|
|
|
limit #{offset},#{size}
|
|
|
</select>
|
|
|
|
|
|
```
|
|
|
|
|
|
### 错误编码
|
|
|
|
|
|
-------------------------
|
|
|
|错误码code|消息|说明|
|
|
|
|--------|----|----|
|
|
|
|200|操作成功| |
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` 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":"专题"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
|
|
|
``` |
...
|
...
|
|