<?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="com.ruoyi.base.mapper.BaseCategoryMapper">
    
    <resultMap type="BaseCategory" id="BaseCategoryResult">
        <result property="id"    column="id"    />
        <result property="code"    column="code"    />
        <result property="pid"    column="pid"    />
        <result property="sort"    column="sort"    />
        <result property="title"    column="title"    />
        <result property="content"    column="content"    />
        <result property="isSystem"    column="is_system"    />
        <result property="userId"    column="user_id"    />
        <result property="remark"    column="remark"    />
        <result property="creator"    column="creator"    />
        <result property="createTime"    column="create_time"    />
        <result property="updater"    column="updater"    />
        <result property="updateTime"    column="update_time"    />
        <result property="delFlag"    column="del_flag"    />
    </resultMap>

    <sql id="selectBaseCategoryVo">
        select id, code, pid, sort, title, content, is_system, user_id, remark, creator, create_time, updater, update_time, del_flag from dl_base_category
    </sql>

    <select id="queryListPage" parameterType="BaseCategory" resultMap="BaseCategoryResult">
        <include refid="selectBaseCategoryVo"/>
        <where>
                        <if test="entity.code != null  and entity.code != ''"> and code = #{entity.code}</if>
                        <if test="entity.pid != null  and entity.pid != ''"> and pid = #{entity.pid}</if>
                        <if test="entity.sort != null "> and sort = #{entity.sort}</if>
                        <if test="entity.title != null  and entity.title != ''"> and title = #{entity.title}</if>
                        <if test="entity.content != null  and entity.content != ''"> and content = #{entity.content}</if>
                        <if test="entity.isSystem != null "> and is_system = #{entity.isSystem}</if>
                        <if test="entity.remark != null  and entity.remark != ''"> and remark = #{entity.remark}</if>
        </where>
    </select>
</mapper>