<?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.iflytek.astron.console.commons.mapper.space.ApplyRecordMapper">

    <select id="selectVOPageByParam" resultType="com.iflytek.astron.console.commons.dto.space.ApplyRecordVO">
        select a.* from agent_apply_record a
        <where>
            <if test="spaceId != null">
                and a.space_id = #{spaceId}
            </if>
            <if test="enterpriseId != null">
                and a.enterprise_id = #{enterpriseId}
            </if>
            <if test="nickname != null and nickname != ''">
                and a.apply_nickname like concat('%',#{nickname},'%')
            </if>
            <if test="status != null and status != 0">
                and a.status = #{status}
            </if>
        </where>
        order by a.id desc
    </select>

</mapper>