<?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.zcloud.fire.check.persistence.mapper.CorpInfoMapper">

    <select id="listPage" resultType="com.zcloud.fire.check.persistence.dataobject.CorpInfoDO">
        select c.*
        from corp_info c
        where c.delete_enum = 'FALSE'
        <if test="params.likeCorpName != null and params.likeCorpName != ''">
            AND c.corp_name LIKE CONCAT('%',#{params.likeCorpName},'%')
        </if>
        <if test="params.eqUseFlag != null and params.eqUseFlag != ''">
            and c.use_flag = #{params.eqUseFlag}
        </if>
        <if test="params.inType != null ">
            and c.type in
            <foreach collection="params.inType" item="item" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        order by c.corp_order asc, c.create_time desc
    </select>
</mapper>

