<?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.web.work.mapper.RecordMapper">
    
    <select id="selectList" resultType="com.ruoyi.web.work.domain.Record">
        select * from tb_record
        <where>  
            <if test="companyId != null "> and company_id = #{companyId}</if>
            <if test="type != null "> and type = #{type}</if>
            <if test="dateBegin != null  and dateBegin != ''"> AND create_time BETWEEN #{dateBegin} AND #{dateEnd} + INTERVAL 1 DAY</if>
        </where>
    </select>

</mapper>