<select id="getPlayerNotes" parameterClass="java.util.Map" resultClass="PlayerGameRecord">
select CREATE_TIME as createTime,PLAYER_INDEX as playerIndex,GAME_TYPE_ID as gameTypeId,SURPLUS_GOLD as surplusGold from $tableName$
WHERE DATE_FORMAT(CREATE_TIME,'%Y%m%d') = #date#
<isNotNull property="startTime" prepend="AND">
= #startTime# ]]>
isNotNull>
<isNotNull property="playerIndex" prepend="AND">
isNotNull>
<isNotNull property="gameTypeId" prepend="AND">
isNotNull>
order by create_time ASC LIMIT 1
select>
<select id="getPlayerCoreProtect" parameterClass="java.util.Map" resultClass="PlayerGameRecord">
select CREATE_TIME as createTime,PLAYER_INDEX as playerIndex,GAME_TYPE_ID as gameTypeId,SURPLUS_GOLD as surplusGold from $tableName$
WHERE DATE_FORMAT(CREATE_TIME,'%Y%m%d') = #date#
<isNotNull property="startTime" prepend="AND">
= #startTime# ]]>
isNotNull>
<isNotNull property="playerIndex" prepend="AND">
isNotNull>
<isNotNull property="gameTypeId" prepend="AND">
isNotNull>
order by create_time desc LIMIT 1
select>
<select id="getAll" parameterClass="java.util.Map" resultClass="PlayerGameRecord">
SELECT * FROM(
SELECT xx.* FROM
(
SELECT
CREATE_TIME, PLAYER_INDEX, SURPLUS_GOLD
FROM `t_player_game_record__20221011`
WHERE DATE_FORMAT(CREATE_TIME,'%Y%m%d') = #date#
<isNotNull property="startTime" prepend="AND">
<![CDATA[ CREATE_TIME >= #startTime# ]]>
</isNotNull>
<isNotNull property="playerIndex" prepend="AND">
<![CDATA[ PLAYER_INDEX = #playerIndex# ]]>
</isNotNull>
<isNotNull property="gameTypeId" prepend="AND">
<![CDATA[ GAME_TYPE_ID = #gameTypeId# ]]>
</isNotNull>
ORDER BY CREATE_TIME DESC
LIMIT 99999999
)xx
GROUP BY xx.PLAYER_INDEX
UNION
SELECT xx.* FROM
(
SELECT
CREATE_TIME, PLAYER_INDEX, SURPLUS_GOLD
FROM `t_player_game_record__20221011`
WHERE DATE_FORMAT(CREATE_TIME,'%Y%m%d') = #date#
<isNotNull property="startTime" prepend="AND">
<![CDATA[ CREATE_TIME >= #startTime# ]]>
</isNotNull>
<isNotNull property="playerIndex" prepend="AND">
<![CDATA[ PLAYER_INDEX = #playerIndex# ]]>
</isNotNull>
<isNotNull property="gameTypeId" prepend="AND">
<![CDATA[ GAME_TYPE_ID = #gameTypeId# ]]>
</isNotNull>
ORDER BY CREATE_TIME ASC
LIMIT 99999999
)xx
GROUP BY xx.PLAYER_INDEX
)yy
ORDER BY yy.PLAYER_INDEX
</select>
<select id="getPlayerNotes" parameterClass="java.util.Map" resultClass="PlayerGameRecord">
SELECT xx.* FROM
(
SELECT
CREATE_TIME, PLAYER_INDEX, SURPLUS_GOLD
FROM `t_player_game_record__20221011`
WHERE DATE_FORMAT(CREATE_TIME,'%Y%m%d') = #date#
<isNotNull property="startTime" prepend="AND">
<![CDATA[ CREATE_TIME >= #startTime# ]]>
</isNotNull>
<isNotNull property="playerIndex" prepend="AND">
<![CDATA[ PLAYER_INDEX = #playerIndex# ]]>
</isNotNull>
<isNotNull property="gameTypeId" prepend="AND">
<![CDATA[ GAME_TYPE_ID = #gameTypeId# ]]>
</isNotNull>
ORDER BY CREATE_TIME ASC
LIMIT 99999999
)xx
GROUP BY xx.PLAYER_INDEX
ORDER BY xx.CREATE_TIME DESC
<select>
<select id="getPlayerCoreProtect" parameterClass="java.util.Map" resultClass="PlayerGameRecord">
SELECT xx.* FROM
(
SELECT
CREATE_TIME, PLAYER_INDEX, SURPLUS_GOLD
FROM `t_player_game_record__20221011`
WHERE DATE_FORMAT(CREATE_TIME,'%Y%m%d') = #date#
<isNotNull property="startTime" prepend="AND">
<![CDATA[ CREATE_TIME >= #startTime# ]]>
</isNotNull>
<isNotNull property="playerIndex" prepend="AND">
<![CDATA[ PLAYER_INDEX = #playerIndex# ]]>
</isNotNull>
<isNotNull property="gameTypeId" prepend="AND">
<![CDATA[ GAME_TYPE_ID = #gameTypeId# ]]>
</isNotNull>
ORDER BY CREATE_TIME DESC
LIMIT 99999999
)xx
GROUP BY xx.PLAYER_INDEX
ORDER BY xx.CREATE_TIME DESC
<select>