<?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.jeeplus.business.drive.mapper.DriveInfoMapper">

    <select id="findPageList" resultType="com.jeeplus.business.drive.domain.DriveInfo">
        select
            id,
            create_by_id,
            create_time,
            update_by_id,
            update_time,
            drive_number,
            drive_identify_number
        from
            jy_drive_info
        ${ew.customSqlSegment}
        ORDER BY update_time DESC
    </select>

    <update id="updateInfoById">
        update
            jy_drive_info
        set
            update_by_id =#{info.updateById},
            update_time = #{info.updateTime},
            drive_number = #{info.driveNumber},
            drive_identify_number = #{info.driveIdentifyNumber}
        where id = #{info.id}
    </update>

    <select id="findById" resultType="com.jeeplus.business.drive.domain.DriveInfo">
        select
            id,
            create_by_id,
            create_time,
            update_by_id,
            update_time,
            drive_number,
            drive_identify_number
        from
            jy_drive_info
        where id=#{id}
    </select>

    <select id="checkNumber" resultType="com.jeeplus.business.drive.domain.DriveInfo">
        select
            id,
            create_by_id,
            create_time,
            update_by_id,
            update_time,
            drive_number,
            drive_identify_number
        from
            jy_drive_info
        where drive_number=#{number} and del_flag = '0'
    </select>


</mapper>