From 4548c5045b3a5522ad14df7c939f0303c1e17587 Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Sat, 11 Oct 2025 19:07:29 +0800
Subject: [PATCH] ้…้€่ดน

---
 oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml b/oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml
index 56d0931..b5bb2f5 100644
--- a/oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml
+++ b/oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml
@@ -41,6 +41,8 @@
         <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"/>
@@ -67,7 +69,7 @@
     </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">
@@ -122,8 +124,7 @@
                 or p.product_name like concat('%',#{blurry},'%')
                 or p.product_title like concat('%',#{blurry},'%')
                 or p.product_description like concat('%',#{blurry},'%')
-                or o.orderNum like concat('%',#{blurry},'%')
-                or o.order_describe like concat('%',#{blurry},'%')
+                or o.return_num like concat('%',#{blurry},'%')
                 or o.username like concat('%',#{blurry},'%')
                 or o.order_num like concat('%',#{blurry},'%'))
             </if>
@@ -132,8 +133,15 @@
 
     <update id="updatePayStatus">
         update sh_order_return
-        set return_status = #{payState},
-            success_time  = #{payTime}
+        set refund_status = #{refundStatus},
+            success_time  = #{successTime}
+        where return_num = #{returnNum}
+    </update>
+    <update id="updateStatus">
+        update sh_order_return
+        set return_status = #{returnStatus},
+            return_status_describe = #{value},
+            audit_status  = #{auditStatus}
         where return_num = #{returnNum}
     </update>
 
@@ -151,10 +159,10 @@
         ) 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
@@ -162,7 +170,7 @@
     </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"/>

--
Gitblit v1.9.3