<?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.hc.business.mapper.ZccmOrderUserLogMapper">

    <resultMap type="zccmorderUserLog" id="OrderUserLogMap">
        <result property="orderLogId" column="order_log_id" jdbcType="INTEGER"/>
        <result property="orderId" column="order_id" jdbcType="INTEGER"/>
        <result property="reUserId" column="re_user_id" jdbcType="INTEGER"/>
        <result property="createTime" column="create_time" jdbcType="INTEGER"/>
    </resultMap>

    <sql id="Base_Column_List">
        order_log_id,
           order_id,
           re_user_id,
           create_time
    </sql>

    <select id="queryByOrderId" resultMap="OrderUserLogMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM zccm_order_user_log
        WHERE order_id = #{ordersId}
    </select>

    <select id="queryByUserIdAndOrderId" resultMap="OrderUserLogMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM zccm_order_user_log
        WHERE order_id = #{ordersId} AND re_user_id = #{userId}
    </select>


</mapper>