From c26e227abe288476c11b0a8b7875045e71efa14c Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: Thu, 30 Apr 2026 17:30:00 +0800
Subject: [PATCH] 新增修改

---
 multi-system/src/main/resources/mapper/system/ExPhaseStudentMapper.xml |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/multi-system/src/main/resources/mapper/system/ExPhaseStudentMapper.xml b/multi-system/src/main/resources/mapper/system/ExPhaseStudentMapper.xml
index 00173b6..10f9263 100644
--- a/multi-system/src/main/resources/mapper/system/ExPhaseStudentMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/ExPhaseStudentMapper.xml
@@ -20,6 +20,7 @@
         <id     property="id"       column="course_id"        />
         <result property="name"     column="course_name"      />
         <result property="logo"     column="course_logo"      />
+        <result property="stopTime"     column="stop_time"      />
         <association property="period" javaType="java.lang.Long"  select="getCoursePeriod" column="{courseId=course_id}"/>
     </resultMap>
 
@@ -49,7 +50,7 @@
     </select>
 
     <select id="selectPhaseStudentList" resultMap="ExPhaseStudentResult">
-        select a.*,b.phone as student_phone,b.name as student_name,c.name as phase_name,e.name as create_name,d.id as course_id,d.logo as course_logo,d.name as course_name from ex_phase_student a
+        select a.*,b.phone as student_phone,b.name as student_name,c.name as phase_name,e.name as create_name,d.id as course_id,d.logo as course_logo,d.name as course_name,d.stop_time from ex_phase_student a
         left join ex_student b on a.student_id=b.id
         left join ex_course_phase c on c.id=a.phase_id
         left join ex_course d on d.id=c.course_id
@@ -66,7 +67,7 @@
                 and b.phone like concat('%',#{studentPhone},'%')
             </if>
             <if test="studentId!=null">
-                and a.student_id=#{studentId}
+                and a.student_id=#{studentId} and (d.stop_time is null or d.stop_time > now())
             </if>
         </where>
         order by a.id desc
@@ -88,7 +89,7 @@
         select a.*,b.name as phase_name,c.id as company_id,c.name as company_name from ex_phase_student a
         left join ex_course_phase b on b.id=a.phase_id
         left join sys_company c on c.id=b.company_id
-        where a.student_id=#{studentId}
+        where b.del_flag = 0 and a.student_id=#{studentId}
     </select>
 
 

--
Gitblit v1.9.2