From 9b867103f0d53bf913bb4ea93687820d92ee0515 Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Thu, 14 Aug 2025 14:45:24 +0800
Subject: [PATCH] 退款订单

---
 oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml b/oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml
index 43c48db..56d0931 100644
--- a/oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml
+++ b/oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml
@@ -9,6 +9,7 @@
         <result column="order_num" property="orderNum"/>
         <result column="order_store_num" property="orderStoreNum"/>
         <result column="order_time" property="orderTime"/>
+        <result column="packaging_price" property="packagingPrice"/>
         <result column="send_price" property="sendPrice"/>
         <result column="send_type" property="sendType"/>
         <result column="pay_type" property="payType"/>
@@ -58,7 +59,7 @@
 
     <sql id="Base_Column_List">
         o.return_id, o.return_num, o.return_status, o.return_status_describe, o.order_num, o.order_store_num,
-        o.order_time, o.send_price, o.send_type, o.pay_type, o.user_id, o.username, o.store_id, o.store_name, o.store_logo,
+        o.order_time, o.packaging_price, o.send_price, o.send_type, o.pay_type, o.user_id, o.username, o.store_id, o.store_name, o.store_logo,
         o.original_price order_original_price, o.paid_price order_paid_price, o.actually_pay_price order_actually_pay_price,
         o.refund_price, o.refund_status, o.success_time, o.channel, o.reason, o.remark, o.photos, o.audit_status,
         o.audit_user, o.audit_time, o.audit_message, o.rider_id, o.rider_phone, o.rider_name,
@@ -133,7 +134,7 @@
         update sh_order_return
         set return_status = #{payState},
             success_time  = #{payTime}
-        where order_num = #{orderNum}
+        where return_num = #{returnNum}
     </update>
 
     <select id="findAll" resultMap="BaseResultMap">
@@ -143,7 +144,11 @@
         <include refid="Base_Column_List"/>
         from sh_order_return as o
         <include refid="Where_sql"/>
-        order by o.return_id desc ) o
+        order by o.return_id desc
+        <if test="criteria.offset != null">
+            limit #{criteria.offset}, #{criteria.size}
+        </if>
+        ) 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
@@ -168,4 +173,10 @@
         <include refid="Where_Sql_Product"/>
         ) t
     </select>
+    <select id="getByOrderNum" resultType="com.oying.modules.sh.domain.OrderReturn">
+        select
+        <include refid="Base_Column_List"/>
+        from sh_order_return as o
+        where o.order_num = #{orderNum} and o.audit_status = #{status}
+    </select>
 </mapper>

--
Gitblit v1.9.3