<?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.heketai.website.mapper.CompanyAuthorizeMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.heketai.website.entity.AuthorizeCompany">
        <id column="id" property="id" />
        <result column="company_name" property="companyName" />
        <result column="company_code" property="companyCode" />
        <result column="image" property="image" />
    </resultMap>

    <select id="selectByPage" parameterType="com.heketai.website.entity.AuthorizeCompany" resultType="com.heketai.website.entity.AuthorizeCompany">
        select * from authorize_company
        where 1=1
        <if test="companyName != null and companyName != ''" >
            and company_name like '%${companyName}%' or  company_code like '%${companyName}%'
        </if>
    </select>
</mapper>
