From 1882d607549762a84b1a5326f7262eba01363b85 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期一, 14 八月 2023 10:00:16 +0800
Subject: [PATCH] 更新课包功能

---
 cloud-server-course/src/main/resources/mapper/TCoursePackagePaymentMapper.xml |   61 ++++++++++++++++++++++++++++++
 1 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/cloud-server-course/src/main/resources/mapper/TCoursePackagePaymentMapper.xml b/cloud-server-course/src/main/resources/mapper/TCoursePackagePaymentMapper.xml
index 6df7fb4..506c725 100644
--- a/cloud-server-course/src/main/resources/mapper/TCoursePackagePaymentMapper.xml
+++ b/cloud-server-course/src/main/resources/mapper/TCoursePackagePaymentMapper.xml
@@ -42,4 +42,65 @@
         and `code` = #{code}
     </if>
     </select>
+
+
+
+    <select id="queryRegistrationRecord" resultType="map">
+        select
+        CAST(id AS CHAR(20)) as id,
+        appUserId,
+        studentId,
+        DATE_FORMAT(insertTime, '%Y-%m-%d %H:%i') as insertTime,
+        totalClassHours,
+        absencesNumber,
+        `status`
+        from t_course_package_payment where payStatus = 2 and state = 1
+        <if test="null != coursePackageId">
+            and coursePackageId = #{coursePackageId}
+        </if>
+        <if test="null != userIds">
+            and appUserId in
+            <foreach collection="userIds" item="item" index="index" separator="," open="(" close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="null != studentIds">
+            and studentId in
+            <foreach collection="studentIds" item="item" index="index" separator="," open="(" close=")">
+                #{item}
+            </foreach>
+        </if>
+        order by insertTime desc
+    </select>
+
+
+    <select id="queryWalkInStudentList" resultType="map">
+        select
+        CAST(id AS CHAR(20)) as id,
+        appUserId,
+        studentId
+        from t_course_package_payment where payStatus = 2 and state = 1
+        <if test="null != coursePackageId">
+            and coursePackageId = #{coursePackageId}
+        </if>
+        <if test="null != coursePackagePaymentId">
+            and id not in
+            <foreach collection="coursePackagePaymentId" item="item" index="index" separator="," open="(" close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="null != userIds">
+            and appUserId in
+            <foreach collection="userIds" item="item" index="index" separator="," open="(" close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="null != studentIds">
+            and studentId in
+            <foreach collection="studentIds" item="item" index="index" separator="," open="(" close=")">
+                #{item}
+            </foreach>
+        </if>
+        order by insertTime desc
+    </select>
 </mapper>

--
Gitblit v1.7.1