<?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.BaseSiteMapper">
    
    <resultMap type="BaseSite" id="BaseSiteResult">
        <result property="id"    column="id"    />
        <result property="siteName"    column="site_name"    />
        <result property="siteUrl"    column="site_url"    />
        <result property="siteContent"    column="site_content"    />
        <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="selectBaseSiteVo">
        select id, site_name, site_url, site_content, creator, create_time, updater, update_time, del_flag from dl_base_site
    </sql>

    <select id="queryListPage" parameterType="BaseSite" resultMap="BaseSiteResult">
        <include refid="selectBaseSiteVo"/>
        <where>
            and del_flag='0'
                        <if test="entity.siteName != null  and entity.siteName != ''"> and site_name like concat('%', #{entity.siteName}, '%')</if>
                        <if test="entity.siteUrl != null  and entity.siteUrl != ''"> and site_url = #{entity.siteUrl}</if>
                        <if test="entity.siteContent != null  and entity.siteContent != ''"> and site_content = #{entity.siteContent}</if>
        </where>
    </select>
</mapper>