From 7e7f901b2172281dc294dfbc67e6ad00625f09f4 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期一, 04 三月 2024 10:11:21 +0800
Subject: [PATCH] 合并代码

---
 cloud-server-course/src/main/resources/mapper/CoursePackagePaymentConfigMapper.xml |   58 ++++++++++++++++++++++++++++++----------------------------
 1 files changed, 30 insertions(+), 28 deletions(-)

diff --git a/cloud-server-course/src/main/resources/mapper/CoursePackagePaymentConfigMapper.xml b/cloud-server-course/src/main/resources/mapper/CoursePackagePaymentConfigMapper.xml
index 66adb5f..51e74da 100644
--- a/cloud-server-course/src/main/resources/mapper/CoursePackagePaymentConfigMapper.xml
+++ b/cloud-server-course/src/main/resources/mapper/CoursePackagePaymentConfigMapper.xml
@@ -4,32 +4,31 @@
 
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.dsh.course.entity.CoursePackagePaymentConfig">
-        <id column="id" property="id" />
-        <result column="coursePackageId" property="coursePackageId" />
-        <result column="payType" property="payType" />
-        <result column="classHours" property="classHours" />
-        <result column="cashPayment" property="cashPayment" />
-        <result column="playPaiCoin" property="playPaiCoin" />
+        <id column="id" property="id"/>
+        <result column="coursePackageId" property="coursePackageId"/>
+        <result column="payType" property="payType"/>
+        <result column="classHours" property="classHours"/>
+        <result column="cashPayment" property="cashPayment"/>
+        <result column="playPaiCoin" property="playPaiCoin"/>
     </resultMap>
     <update id="changeState">
-            update t_course_package_payment set
-            payStatus = 2,payUserName = #{payUserName},payType = 7,payUserId=#{payUserId}
-            <where>
-                <if test="ids != null and ids.size()>0">
-                    AND t_course_package_payment.id IN
-                    <foreach collection="ids" separator="," item="id" open="(" close=")">
-                        #{id}
-                    </foreach>
-                </if>
-            </where>
+        update t_course_package_order set
+        payStatus = 2,payUserName = #{payUserName},payType = 7,payUserId=#{payUserId},
+        payUserType = 2
+        <where>
+            <if test="ids!=null and ids!= ''">
+                and t_course_package_order.id = #{ids}
+            </if>
+        </where>
     </update>
 
     <select id="listAll" resultType="com.dsh.course.model.CoursePackagePaymentVO">
-        select t1.id,t1.studentId,t1.payUserType,t1.payStatus,t1.payType,t1.originalPrice,t1.userCouponId,t1.payUserId,t1.giftClassHours,t1.studentId,t1.appUserId,t1.cashPayment,t1.playPaiCoin,
-        t1.payUserName as buyTypeName,
-               CONCAT(t2.province,t2.city) as provinceAndCity,t2.coursePackageTypeId,t2.storeId,t2.name as coursePackage,
-               t3.name as coursePackageType
-        from t_course_package_payment t1
+        select
+        t1.id,t1.payUserType,t1.payStatus,t1.payType,t1.originalPrice,t1.userCouponId,t1.payUserId,t1.studentIds as studentId,t1.appUserId,t1.cashPayment,t1.playPaiCoin,
+        t1.payUserName as buyTypeName, t1.classHours as classHours,t1.insertTime as insertTime,t1.coursePackageId as coursePackageId,
+        CONCAT(t2.province,t2.city) as provinceAndCity,t2.coursePackageTypeId,t2.storeId,t2.name as coursePackage,
+        t3.name as coursePackageType
+        from t_course_package_order t1
         left join t_course_package t2 on t1.coursePackageId = t2.id
         left join t_course_package_type t3 on t2.coursePackageTypeId = t3.id
         <where>
@@ -45,9 +44,9 @@
             <if test="query.coursePackageTypeName!=null and query.coursePackageTypeName!= ''">
                 and t2.name like concat('%',#{query.coursePackageTypeName},'%')
             </if>
-            <if test="query.storesIds != null and query.storesIds.size()>0">
+            <if test="query.storeIds != null and query.storeIds.size>0">
                 AND t2.storeId IN
-                <foreach collection="query.storesIds" separator="," item="id" open="(" close=")">
+                <foreach collection="query.storeIds" separator="," item="id" open="(" close=")">
                     #{id}
                 </foreach>
             </if>
@@ -55,17 +54,20 @@
                 and t1.payStatus = #{query.payStatus}
             </if>
             <if test="query.ids !=null and query.ids.size >0">
-                and t2.storeId in <foreach collection="query.ids" close=")" item="id" open="(" separator=",">
-                #{id}
-            </foreach>
+                and t2.id in
+                <foreach collection="query.ids" close=")" item="id" open="(" separator=",">
+                    #{id}
+                </foreach>
             </if>
         </where>
     </select>
     <select id="listAllRegister" resultType="com.dsh.course.model.RegisterOrderVO">
-        select t1.id,t1.studentId,t1.payUserType,t1.payStatus,t1.payType,t1.originalPrice,t1.userCouponId,t1.payUserId,t1.giftClassHours,t1.appUserId,t1.cashPayment as money,t1.playPaiCoin,
+        select
+        t1.id,t1.studentIds,t1.payUserType,t1.payStatus,t1.payType,t1.originalPrice,t1.userCouponId,t1.payUserId,t1.appUserId,t1.cashPayment
+        as money,t1.playPaiCoin,
         t1.insertTime,
         CONCAT(t2.province,t2.city) as provinceAndCity,t2.coursePackageTypeId,t2.storeId,t2.name as coursePackageName
-        from t_course_package_payment t1
+        from t_course_package_order t1
         left join t_course_package t2 on t1.coursePackageId = t2.id
         <where>
             <if test="query.amount!=null and query.amount!= ''">

--
Gitblit v1.7.1