| | |
| | | </if> |
| | | order by insertTime desc |
| | | </select> |
| | | |
| | | <select id="listAll" resultType="com.dsh.course.entity.StudentClassInfo"> |
| | | SELECT |
| | | SUM( py.totalClassHours ) AS totalHours, |
| | | SUM( py.laveClassHours ) AS restHours, |
| | | SUM( py.giftClassHours ) as giftHours |
| | | FROM |
| | | t_course_package_payment py |
| | | |
| | | where py.studentId = #{tStudentId} |
| | | |
| | | </select> |
| | | |
| | | <select id="getClassList" resultType="com.dsh.course.entity.dto.ClassListDto"> |
| | | |
| | | SELECT |
| | | *, |
| | | pg.NAME AS className, |
| | | ty.`name` AS classType |
| | | FROM |
| | | t_course_package_payment py |
| | | LEFT JOIN t_course_package pg ON py.coursePackageId = pg.id |
| | | LEFT JOIN t_course_package_type ty ON pg.type = ty.id |
| | | |
| | | <where> |
| | | <if test="null != tStudentId"> |
| | | py.studentId = #{tStudentId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="getMaxDate" resultType="java.util.Date"> |
| | | SELECT |
| | | MAX(useTime) |
| | | FROM t_course_package_payment py |
| | | where py.studentId = #{tStudentId} |
| | | </select> |
| | | </mapper> |