전투 이벤트 정렬 수정

This commit is contained in:
2025-03-06 11:58:10 +09:00
parent 4f1a26ca96
commit 8dcfc4ed13

View File

@@ -116,8 +116,9 @@
, (SELECT @row_number:=0) AS t
) Z
ORDER BY
CASE WHEN Z.status = 'STOP' THEN 1 WHEN Z.status = 'END' THEN 2 WHEN Z.status = 'FAIL' OR Z.status = 'CANCEL' THEN 3 ELSE 0 END,
TIME (event_start_dt),
CASE WHEN Z.status = 'STOP' THEN 2 WHEN Z.status = 'END' THEN 3 WHEN Z.status = 'FAIL' OR Z.status = 'CANCEL' THEN 4 WHEN Z.status = 'RUNNING' THEN 0 ELSE 1 END,
CASE WHEN DATE(Z.event_start_dt) <= DATE(NOW()) THEN 0 ELSE 1 END,
CASE WHEN DATE(Z.event_start_dt) <= DATE(NOW()) THEN TIME(Z.event_start_dt) ELSE Z.event_start_dt END,
<if test="orderby != null and orderby != ''">
row_num ${orderby}
</if>
@@ -194,6 +195,20 @@
</select>
<select id="getCheckBattleEventList" parameterType="com.caliverse.admin.domain.request.BattleEventRequest" resultMap="BattleEventResultMap">
SELECT id
, event_id
, repeat_type
, event_operation_time
, event_start_dt
, event_end_dt
FROM battle_event
WHERE status NOT IN ('END', 'FAIL', 'CANCEL', 'STOP')
<if test="id != null and id != ''">
AND id &lt;&gt; #{id}
</if>
</select>
<select id="getCheckBattleEventList_bak" parameterType="com.caliverse.admin.domain.request.BattleEventRequest" resultMap="BattleEventResultMap">
SELECT id
, event_id
, repeat_type