| | |
| | | <result column="rider_name" property="riderName"/> |
| | | <collection property="productSnapshots" ofType="com.oying.modules.sh.domain.OrderReturnProductSnapshot"> |
| | | <id column="snapshot_id" property="snapshotId"/> |
| | | <result column="return_num" property="returnNum"/> |
| | | <result column="store_id" property="storeId"/> |
| | | <result column="product_id" property="productId"/> |
| | | <result column="product_code" property="productCode"/> |
| | | <result column="product_barcode" property="productBarcode"/> |
| | |
| | | </sql> |
| | | |
| | | <sql id="Product_Column_List"> |
| | | p.snapshot_id, p.product_id, p.product_code, p.product_barcode, p.product_name, p.product_title, p.product_main_image, |
| | | p.snapshot_id, p.return_num, p.store_id, p.product_id, p.product_code, p.product_barcode, p.product_name, p.product_title, p.product_main_image, |
| | | p.product_description, p.param_data, p.unit_price, p.detail_count, p.original_price, p.paid_price, p.actually_pay_price |
| | | </sql> |
| | | <sql id="Where_sql"> |
| | |
| | | ) o |
| | | left join sh_order_return_product_snapshot as p on p.return_num = o.return_num |
| | | <include refid="Where_Sql_Product"/> |
| | | order by o.order_id desc |
| | | order by o.return_id desc |
| | | </select> |
| | | <select id="getByReturnNum" resultMap="BaseResultMap"> |
| | | select o.* from ( select |
| | | select o.*, from ( select |
| | | <include refid="Base_Column_List"/> |
| | | from sh_order_return as o ) o |
| | | left join sh_order_return_product_snapshot as p on p.return_num = o.return_num |
| | |
| | | </select> |
| | | <select id="countAll" resultType="java.lang.Long"> |
| | | select count(1) from ( |
| | | select distinct o.* |
| | | select distinct o.*, |
| | | p.product_code, p.product_barcode, p.product_name, p.product_title, p.product_description |
| | | from ( select |
| | | <include refid="Base_Column_List"/> |