puzhibing
2024-03-04 7e7f901b2172281dc294dfbc67e6ad00625f09f4
cloud-server-course/src/main/resources/mapper/CoursePackageStudentMapper.xml
@@ -13,7 +13,15 @@
        studentId,
        signInOrNot,
        reservationStatus
        from t_course_package_student where coursePackageSchedulingId = #{coursePackageSchedulingId}
        from t_course_package_student where 1=1
        <if test="ids != null and ids.size() > 0">
            and coursePackageSchedulingId in
            <foreach collection="ids" close=")" item="id" open="(" separator=",">
                #{id}
            </foreach>
        </if>
        and reservationStatus != 3
        <if test="null != userId">
            and appUserId in
            <foreach collection="appUserId" item="item" index="index" separator="," open="(" close=")">
@@ -35,7 +43,7 @@
            SUM( py.laveClassHours ) AS restHours,
            SUM( py.giftClassHours ) as giftHours
        FROM
            t_course_package_payment  py
            t_course_package_order_student  py
           where  py.studentId = #{tStudentId}
@@ -44,18 +52,19 @@
    <select id="getClassList" resultType="com.dsh.course.entity.dto.ClassListDto">
        SELECT
            *,
            pg.NAME AS className,
            pg.`type` AS classType
        *,
        pg.NAME AS className,
        pg.`type` AS classType
        FROM
            t_course_package_payment py
                LEFT JOIN t_course_package pg ON py.coursePackageId = pg.id
        t_course_package_order_student py
        LEFT JOIN t_course_package pg ON py.coursePackageId = pg.id
        <where>
              py.status = 1
            <if test="null != tStudentId">
                py.studentId = #{tStudentId}
                and py.studentId = #{tStudentId}
            </if>
            and pg.type!=3
        </where>
    </select>
    <select id="getMaxDate" resultType="java.util.Date">
@@ -64,4 +73,15 @@
        FROM t_course_package_payment py
        where py.studentId = #{tStudentId}
    </select>
    <select id="getHoliList" resultType="com.dsh.course.entity.dto.ClassListDto">
        select
            od.id,od.insertTime as insertTime, cp.name as className,cp.type as classType
        from t_course_package_order od
                 left join t_course_package cp on od.coursePackageId = cp.id
        WHERE            od.payStatus = 2  and cp.type = 2
    </select>
</mapper>