44323
2023-08-17 1d07f8271751880bdfbf3ea41e696f9ee719888b
cloud-server-course/src/main/resources/mapper/TCoursePackagePaymentMapper.xml
@@ -55,4 +55,65 @@
            and appUserId = #{appUserId}
        </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>