전투시스템 버그 수정

This commit is contained in:
2025-02-24 17:46:52 +09:00
parent 2b77a46ab6
commit 1a19b21f9a

View File

@@ -74,7 +74,7 @@
<if test="reward_id != null and reward_id != ''">
<choose>
<when test="reward_id != 'ALL' ">
AND a.reward_id = #{reward_id}
AND a.reward_group_id = #{reward_id}
</when>
</choose>
</if>
@@ -107,8 +107,8 @@
</choose>
</if>
<if test="start_dt != null and start_dt != '' and end_dt !=null and end_dt!= ''">
AND a.event_start_dt &gt;= #{start_dt, jdbcType=TIMESTAMP}
AND a.event_end_dt &lt;= #{end_dt, jdbcType=TIMESTAMP}
AND DATE(a.event_start_dt) &gt;= DATE(#{start_dt, jdbcType=TIMESTAMP})
AND DATE(a.event_end_dt) &lt;= DATE(#{end_dt, jdbcType=TIMESTAMP})
</if>
GROUP BY a.id
ORDER BY status
@@ -116,7 +116,8 @@
, (SELECT @row_number:=0) AS t
) Z
ORDER BY
CASE WHEN Z.status = 'FAIL' OR Z.status = 'CANCEL' THEN 1 ELSE 0 END,
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),
<if test="orderby != null and orderby != ''">
row_num ${orderby}
</if>
@@ -132,13 +133,50 @@
<select id="getAllCnt" resultType="java.lang.Integer" parameterType="map">
SELECT count(*) FROM battle_event a
WHERE 1 = 1
<if test="title != null and title != ''">
AND b.title LIKE CONCAT('%',#{title},'%')
</if>
<if test="event_type != null and event_type != ''">
<choose>
<when test="search_type == 'NAME' or search_type == 'name' ">
<if test="search_data != null and search_data != ''">
AND a.event_name LIKE CONCAT('%',#{search_data},'%')
</if>
</when>
<otherwise>
<if test="search_data != null and search_data != ''">
AND a.event_id = #{search_data}
</if>
</otherwise>
</choose>
<if test="config_id != null and config_id != ''">
<choose>
<when test="event_type != 'ALL' ">
AND event_type = #{event_type}
<when test="config_id != 'ALL' ">
AND a.config_id = #{config_id}
</when>
</choose>
</if>
<if test="reward_id != null and reward_id != ''">
<choose>
<when test="reward_id != 'ALL' ">
AND a.reward_group_id = #{reward_id}
</when>
</choose>
</if>
<if test="repeat_type != null and repeat_type != ''">
<choose>
<when test="repeat_type != 'ALL' ">
AND a.repeat_type = #{repeat_type}
</when>
</choose>
</if>
<if test="hot_time != null and hot_time != ''">
<choose>
<when test="hot_time != 'ALL' ">
AND a.hot_time = #{hot_time}
</when>
</choose>
</if>
<if test="round_count != null and round_count != ''">
<choose>
<when test="round_count != 'ALL' ">
AND a.round_count = #{round_count}
</when>
</choose>
</if>
@@ -150,8 +188,8 @@
</choose>
</if>
<if test="start_dt != null and start_dt != '' and end_dt !=null and end_dt!= ''">
AND a.auction_start_dt &gt;= #{start_dt, jdbcType=TIMESTAMP}
AND a.auction_end_dt &lt;= #{end_dt, jdbcType=TIMESTAMP}
AND DATE(a.event_start_dt) &gt;= DATE(#{start_dt, jdbcType=TIMESTAMP})
AND DATE(a.event_end_dt) &lt;= DATE(#{end_dt, jdbcType=TIMESTAMP})
</if>
</select>
@@ -163,7 +201,7 @@
, event_start_dt
, event_end_dt
FROM battle_event
WHERE status NOT IN ('END', 'FAIL')
WHERE status NOT IN ('END', 'FAIL', 'CANCEL', 'STOP')
<if test="id != null and id != ''">
AND id &lt;&gt; #{id}
</if>
@@ -257,6 +295,7 @@
<update id="updateBattleEvent" parameterType="com.caliverse.admin.domain.request.BattleEventRequest">
UPDATE battle_event SET group_id = #{groupId}
, event_name = #{eventName}
, event_operation_time = #{eventOperationTime}
, config_id = #{configId}
, event_start_dt = #{eventStartDt}
, event_end_dt = #{eventEndDt}
@@ -292,19 +331,19 @@
<select id="getScheduleBattleEventList" resultMap="BattleEventResultMap">
SELECT id
, a.group
, a.event_id
, a.event_name
, a.repeat_type
, a.event_operation_time
, a.status
, a.event_start_dt
, a.event_end_dt
, a.round_time
, a.round_count
, a.hot_time
, a.config_id
, a.reward_group_id
, group_id
, event_id
, event_name
, repeat_type
, event_operation_time
, status
, event_start_dt
, event_end_dt
, round_time
, round_count
, hot_time
, config_id
, reward_group_id
FROM battle_event
WHERE (status = 'WAIT' or status = 'RUNNING' or status = 'REGISTER')
AND deleted = 0