<?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.mall.mapper.AftersaleItemMapper">

    <resultMap type="AftersaleItem" id="AftersaleItemResult">
        <result property="id" column="id"/>
        <result property="memberId" column="member_id"/>
        <result property="orderId" column="order_id"/>
        <result property="orderItemId" column="order_item_id"/>
        <result property="returnAmount" column="return_amount"/>
        <result property="quantity" column="quantity"/>
        <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="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time" />
    </resultMap>

    <sql id="selectAftersaleItemVo">
        select id, member_id, order_id, order_item_id, return_amount, quantity, create_by, create_time, update_by, update_time   from oms_aftersale_item
    </sql>

<!--    <insert id="insertBatch" parameterType="list">-->
<!--        insert into oms_aftersale_item-->
<!--        (member_id,order_id,aftersale_id,order_item_id,return_amount,quantity,create_by,create_time,update_by,update_time)-->
<!--        values-->
<!--        <foreach collection="list" item="item" separator=",">-->
<!--            <trim prefix="(" suffix=")" suffixOverrides=",">-->
<!--                #{item.memberId,jdbcType=BIGINT},-->
<!--                #{item.orderId,jdbcType=BIGINT},-->
<!--                #{item.aftersaleId,jdbcType=BIGINT},-->
<!--                #{item.orderItemId,jdbcType=BIGINT},-->
<!--                #{item.returnAmount,jdbcType=DECIMAL},-->
<!--                #{item.quantity,jdbcType=BIGINT},-->
<!--                #{item.createBy,jdbcType=BIGINT},-->
<!--                #{item.createTime,jdbcType=DATE},-->
<!--                #{item.updateBy,jdbcType=BIGINT},-->
<!--                #{item.updateTime,jdbcType=DATE}-->
<!--            </trim>-->
<!--        </foreach>-->
<!--    </insert>-->

<!--    <select id="selectByEntity" parameterType="AftersaleItem" >-->
<!--        <include refid="selectAftersaleItemVo"/>-->
<!--        <where>-->
<!--            <if test="memberId != null "> and member_id = #{memberId}</if>-->
<!--            <if test="orderId != null "> and order_id = #{orderId}</if>-->
<!--            <if test="orderItemId != null "> and order_item_id = #{orderItemId}</if>-->
<!--            <if test="returnAmount != null "> and return_amount = #{returnAmount}</if>-->
<!--            <if test="quantity != null "> and quantity = #{quantity}</if>-->
<!--        </where>-->
<!--    </select>-->
</mapper>
