|
@@ -1342,9 +1342,22 @@
|
|
<select id="getRegisterOrPreList" resultType="com.ym.mec.biz.dal.dto.RegisterDto">
|
|
<select id="getRegisterOrPreList" resultType="com.ym.mec.biz.dal.dto.RegisterDto">
|
|
SELECT u.user_id_ userId,
|
|
SELECT u.user_id_ userId,
|
|
su.username_ studentName,
|
|
su.username_ studentName,
|
|
- IFNULL(s2.name_, s1.name_) actualSubjectName,
|
|
|
|
- spr.create_time_ perRegisterTime,
|
|
|
|
- o.payTime
|
|
|
|
|
|
+ <if test="orderByPerRegister == null">
|
|
|
|
+ IFNULL(spr.create_time_,'2099-12-31') perRegisterTime,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="orderByPerRegister != null and orderByPerRegister=='ASC'">
|
|
|
|
+ IFNULL(spr.create_time_,'2099-12-31') perRegisterTime,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="orderByPerRegister != null and orderByPerRegister=='DESC'">
|
|
|
|
+ IFNULL(spr.create_time_,'1990-12-31') perRegisterTime,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="orderByPayTime != null and orderByPayTime=='ASC'">
|
|
|
|
+ IFNULL(o.payTime,'2099-12-31') payTime,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="orderByPayTime != null and orderByPayTime=='DESC'">
|
|
|
|
+ IFNULL(o.payTime,'1990-12-31') payTime,
|
|
|
|
+ </if>
|
|
|
|
+ IFNULL(s2.name_, s1.name_) actualSubjectName
|
|
FROM (SELECT user_id_
|
|
FROM (SELECT user_id_
|
|
FROM student_pre_registration
|
|
FROM student_pre_registration
|
|
WHERE music_group_id_ = #{musicGroupId}
|
|
WHERE music_group_id_ = #{musicGroupId}
|
|
@@ -1379,16 +1392,16 @@
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
<if test="orderByPerRegister != null and orderByPayTime == null">
|
|
<if test="orderByPerRegister != null and orderByPayTime == null">
|
|
- ORDER BY spr.create_time_ ${orderByPerRegister},u.user_id_ ASC
|
|
|
|
|
|
+ ORDER BY perRegisterTime ${orderByPerRegister},u.user_id_ ASC
|
|
</if>
|
|
</if>
|
|
<if test="orderByPerRegister != null and orderByPayTime != null">
|
|
<if test="orderByPerRegister != null and orderByPayTime != null">
|
|
- ORDER BY spr.create_time_ ${orderByPerRegister},o.payTime ${orderByPayTime},u.user_id_ ASC
|
|
|
|
|
|
+ ORDER BY perRegisterTime ${orderByPerRegister},payTime ${orderByPayTime},u.user_id_ ASC
|
|
</if>
|
|
</if>
|
|
<if test="orderByPerRegister == null and orderByPayTime != null">
|
|
<if test="orderByPerRegister == null and orderByPayTime != null">
|
|
- ORDER BY o.payTime ${orderByPayTime},u.user_id_ ASC
|
|
|
|
|
|
+ ORDER BY payTime ${orderByPayTime},u.user_id_ ASC
|
|
</if>
|
|
</if>
|
|
<if test="orderByPerRegister == null and orderByPayTime == null">
|
|
<if test="orderByPerRegister == null and orderByPayTime == null">
|
|
- ORDER BY spr.create_time_ ASC,u.user_id_ ASC
|
|
|
|
|
|
+ ORDER BY perRegisterTime ASC,u.user_id_ ASC
|
|
</if>
|
|
</if>
|
|
<include refid="global.limit"/>
|
|
<include refid="global.limit"/>
|
|
</select>
|
|
</select>
|