<?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.zbkj.service.dao.StoreOrderReturnInfoDao">

    <select id="selectByReturnId" resultType="com.zbkj.common.model.order.StoreOrderReturnInfo">
        SELECT
            oi.product_id productId,
            oi.product_name storeName,
            oi.image,
            oi.attr_value_id attrValueId,
            ri.return_num returnNum
        FROM eb_store_order_info oi
        INNER JOIN eb_store_order_return_info ri ON oi.order_id = ri.order_id AND oi.attr_value_id = ri.attr_value_id
        where ri.return_id = #{id}
    </select>
    
</mapper>
