<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="cn.lili.modules.lmk.mapper.TagMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="cn.lili.modules.lmk.domain.vo.TagVO">
|
<id column="id" property="id"/>
|
<result column="tag_type_id" property="tagTypeId"/>
|
<result column="tag_type_name" property="tagTypeName"/>
|
<result column="tag_name" property="tagName"/>
|
<result column="sort_num" property="sortNum"/>
|
|
</resultMap>
|
<select id="getPage" resultMap="BaseResultMap">
|
select t.id,t.tag_type_id,t.tag_name,t.sort_num,tt.tag_type_name as tag_type_name
|
from lmk_tag t
|
left join lmk_tag_type tt on t.tag_type_id = tt.id
|
where t.delete_flag = false
|
<if test="query.tagName != null and query.tagName != ''">
|
and t.tag_name like concat('%',#{query.tagName},'%')
|
</if>
|
<if test="query.tagTypeId != null and query.tagTypeId != ''">
|
and t.tag_type_id like concat('%',#{query.tagTypeId},'%')
|
</if>
|
order by t.sort_num
|
</select>
|
|
</mapper>
|