<?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.zm.order.tool.server.hithistory.HintHistoryPayDao">

    <resultMap id="BaseResultMap" type="com.zm.order.tool.server.model.OrderPayDetails">
        <id column="id" jdbcType="BIGINT" property="id" />
        <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
        <result column="user_id" jdbcType="BIGINT" property="userId" />
        <result column="seller_id" jdbcType="BIGINT" property="sellerId" />
        <result column="store_id" jdbcType="BIGINT" property="storeId" />
        <result column="pay_type" jdbcType="INTEGER" property="payType" />
        <result column="amount" jdbcType="INTEGER" property="amount" />
        <result column="pay_no" jdbcType="VARCHAR" property="payNo"/>
        <result column="third_pay_no" jdbcType="VARCHAR" property="thirdPayNo"/>
        <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
        <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
        <result column="is_deleted" jdbcType="INTEGER" property="isDeleted" />
        <result column="order_at" jdbcType="TIMESTAMP" property="orderAt" />
        <result column="pay_at" jdbcType="TIMESTAMP" property="payAt" />
        <result column="source" jdbcType="TIMESTAMP" property="source" />
        <result column="order_type" jdbcType="TIMESTAMP" property="orderType" />
        <result column="features" jdbcType="TIMESTAMP" property="features" />
        <result column="status" jdbcType="INTEGER" property="status" />
        <result column="biz_type" jdbcType="INTEGER" property="bizType" />
        <result column="performance_type" jdbcType="INTEGER" property="performanceType" />
    </resultMap>

    <sql id="tb">
        order_pay_details
    </sql>

    <sql id="cols_all">
        id,
        <include refid="cols_exclude_id"/>
    </sql>

    <sql id="cols_exclude_id">
        order_no, user_id, seller_id, store_id, pay_type, amount, pay_no, third_pay_no, created_at,
        updated_at, is_deleted, order_at, pay_at, source, order_type, features, status, biz_type, performance_type
    </sql>

    <select id="selectRespId" parameterType="map" resultMap="BaseResultMap">
        select
        id
        from
        <include refid="tb"/>
        <where>
            id in
            <foreach collection="list" item="each" index="index" open="(" close=")" separator=",">
                #{each}
            </foreach>
        </where>
    </select>


</mapper>