Skip to content

Commit

Permalink
Rollback selectTransferTxsByPage
Browse files Browse the repository at this point in the history
  • Loading branch information
leej1012 committed Jan 18, 2024
1 parent 8d94c57 commit 0142f97
Showing 1 changed file with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,17 @@
d.contract_hash as contractHash,
c.type AS assetType
FROM tbl_tx_detail d
<!-- INNER JOIN-->
<!-- (-->
<!-- SELECT DISTINCT tx_hash AS `hash`-->
<!-- FROM tbl_tx_detail_index-->
<!-- WHERE address = #{address}-->
<!-- <if test="assetName != '' and assetName != null">-->
<!-- AND asset_name = #{assetName}-->
<!-- </if>-->
<!-- ORDER BY desc_block_height, tx_hash, tx_index-->
<!-- LIMIT #{startIndex}, #{pageSize}-->
<!-- ) idx ON idx.hash = d.tx_hash-->
INNER JOIN
(
SELECT DISTINCT tx_hash AS `hash`
FROM tbl_tx_detail_index
WHERE address = #{address}
<if test="assetName != '' and assetName != null">
AND asset_name = #{assetName}
</if>
ORDER BY desc_block_height, tx_hash, tx_index
LIMIT #{startIndex}, #{pageSize}
) idx ON idx.hash = d.tx_hash
LEFT JOIN tbl_contract c ON d.contract_hash = c.contract_hash
WHERE (d.from_address = #{address}
OR d.to_address = #{address})
Expand All @@ -167,7 +167,6 @@
</if>
AND d.event_type IN (2, 3)
ORDER BY block_height DESC, block_index, tx_hash, tx_index
LIMIT #{startIndex}, #{pageSize}
</select>

<select id="selectTransferTxsByTime" resultType="com.github.ontio.model.dto.TransferTxDto">
Expand Down

0 comments on commit 0142f97

Please sign in to comment.