<?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.BaseSiteInfoMapper">
    
    <resultMap type="BaseSiteInfo" id="BaseSiteInfoResult">
        <result property="id"    column="id"    />
        <result property="companyName"    column="company_name"    />
        <result property="faxNumber"    column="fax_number"    />
        <result property="brandName"    column="brand_name"    />
        <result property="tel"    column="tel"    />
        <result property="email"    column="email"    />
        <result property="teams"    column="teams"    />
        <result property="copyright"    column="copyright"    />
        <result property="address"    column="address"    />
        <result property="icon"    column="icon"    />
        <result property="logo"    column="logo"    />
        <result property="qrCode"    column="qr_code"    />
        <result property="contactUs"    column="contact_us"    />
        <result property="tenantId"    column="tenant_id"    />
        <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="selectBaseSiteInfoVo">
        select id, company_name, fax_number, brand_name, tel, email, teams, copyright, address, icon, logo, qr_code, contact_us, tenant_id, creator, create_time, updater, update_time, del_flag from dl_base_site_info
    </sql>

    <select id="queryListPage" parameterType="BaseSiteInfo" resultMap="BaseSiteInfoResult">
        <include refid="selectBaseSiteInfoVo"/>
        <where>
                        <if test="entity.companyName != null  and entity.companyName != ''"> and company_name like concat('%', #{entity.companyName}, '%')</if>
                        <if test="entity.faxNumber != null  and entity.faxNumber != ''"> and fax_number = #{entity.faxNumber}</if>
                        <if test="entity.brandName != null  and entity.brandName != ''"> and brand_name like concat('%', #{entity.brandName}, '%')</if>
                        <if test="entity.tel != null  and entity.tel != ''"> and tel = #{entity.tel}</if>
                        <if test="entity.email != null  and entity.email != ''"> and email = #{entity.email}</if>
                        <if test="entity.teams != null  and entity.teams != ''"> and teams = #{entity.teams}</if>
                        <if test="entity.copyright != null  and entity.copyright != ''"> and copyright = #{entity.copyright}</if>
                        <if test="entity.address != null  and entity.address != ''"> and address = #{entity.address}</if>
                        <if test="entity.icon != null  and entity.icon != ''"> and icon = #{entity.icon}</if>
                        <if test="entity.logo != null  and entity.logo != ''"> and logo = #{entity.logo}</if>
                        <if test="entity.qrCode != null  and entity.qrCode != ''"> and qr_code = #{entity.qrCode}</if>
                        <if test="entity.contactUs != null  and entity.contactUs != ''"> and contact_us = #{entity.contactUs}</if>
                        <if test="entity.tenantId != null  and entity.tenantId != ''"> and tenant_id = #{entity.tenantId}</if>
        </where>
    </select>
</mapper>