<?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.willalp.yiqing.mapper.HsOrdersLogMapper">
    <resultMap type="com.willalp.yiqing.domain.HsOrdersLog" id="HsOrdersLogResult">
        <result property="id" column="id"/>
        <result property="dateline" column="dateline"/>
        <result property="ordersTime" column="orders_time"/>
        <result property="days" column="days"/>
        <result property="rnsResult" column="rns_result"/>
        <result property="isDelete" column="is_delete"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="remark" column="remark"/>
    </resultMap>

    <sql id="selectHsOrdersLogVo">
        select id,
               dateline,
               orders_time,
               days,
               rns_result,
               is_delete,
               create_by,
               create_time,
               update_by,
               update_time,
               remark
        from hs_yiqing_orders_log
    </sql>

    <select id="selectHsOrdersLogList" parameterType="HsOrdersLog" resultMap="HsOrdersLogResult">
        <include refid="selectHsOrdersLogVo"/>
        <where>
            is_delete = 0
            <if test="dateline != null ">
                and dateline = #{dateline}
            </if>
            <if test="ordersTime != null ">
                and ordersTime = #{ordersTime}
            </if>
            <if test="days != null  and days != ''">
                and days = #{days}
            </if>
            <if test="rnsResult != null  and rnsResult != ''">
                and rns_result = #{rnsResult}
            </if>
        </where>
    </select>
</mapper>
