From 5dc40fcd64b0513150f1d8335ab849e6d8cdc28e Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期五, 04 七月 2025 19:42:49 +0800
Subject: [PATCH] 支付版本更新 根据资金流向使用V2或V3服务商版本支付

---
 cloud-server-course/src/main/resources/mapper/CancelledClassesMapper.xml |   35 +++++++++++++++++++++++++++--------
 1 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/cloud-server-course/src/main/resources/mapper/CancelledClassesMapper.xml b/cloud-server-course/src/main/resources/mapper/CancelledClassesMapper.xml
index 8b0ebe8..4126cec 100644
--- a/cloud-server-course/src/main/resources/mapper/CancelledClassesMapper.xml
+++ b/cloud-server-course/src/main/resources/mapper/CancelledClassesMapper.xml
@@ -3,21 +3,40 @@
 <mapper namespace="com.dsh.course.mapper.CancelledClassesMapper">
 
     <select id="listAll" resultType="com.dsh.course.model.CancelClassesVO">
-        select t1.insertTime as insertTime,t2.coachId as coachId,CONCAT(t2.province,t2.city) as provinceAndCity,
-        t2.storeId as storeId,CONCAT(t3.classDate,t3.endDate) as startAndEnd,
-        t5.name as `courseName`,t4.appUserId as studentId from t_cancelled_classes t1
-        left join t_course_package t2 on t1.coursePackageId = t2.id
-        left join t_course_package_scheduling t3 on t3.coursePackageId = t2.id
-        left join t_course_package_student t4 on t4.coursePackageSchedulingId = t3.id
-        left join t_course t5 on t3.courseId = t5.id
+        SELECT
+        t1.*,
+        t2.name,
+        CONCAT(t2.province, t2.city) AS provinceAndCity,
+        t2.storeId,t2.coachId,
+        t2.name as courseName,t2.coachId
+        FROM
+        t_cancelled_classes t1
+        LEFT JOIN t_course_package t2 ON t1.coursePackageId = t2.id
+
         <where>
             <if test="query.courseName!=null and query.courseName!= ''">
-                and t5.name = #{query.courseName}
+                and t2.name = #{query.courseName}
             </if>
             <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''">
                 and t1.insertTime between #{sTime} and #{eTime}
             </if>
+
+            <if test="query.coachIds != null and query.coachIds.size()>0">
+                AND t2.coachId IN
+                <foreach collection="query.coachIds" separator="," item="id" open="(" close=")">
+                    #{id}
+                </foreach>
+            </if>
+            <if test="collect != null and collect.size>0">
+                AND t2.id IN
+                <foreach collection="collect" separator="," item="id" open="(" close=")">
+                    #{id}
+                </foreach>
+            </if>
         </where>
     </select>
+    <select id="getRefund" resultType="com.dsh.course.entity.MoneyBack">
+        select * from t_back_money where status = 1
+    </select>
 
 </mapper>

--
Gitblit v1.7.1