You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
1.0 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.blockchain.server.eth.mapper.EthBlockNumberMapper">
<resultMap id="EthBlockNumberMap" type="com.blockchain.server.eth.entity.EthBlockNumber">
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="blockNumber" column="block_number"/>
<result property="status" column="status"/>
</resultMap>
<sql id="tableName">dapp_eth_block_number</sql>
<select id="selectMaxBlockNumber" resultType="BigInteger">
SELECT block_number FROM
<include refid="tableName"/>
ORDER BY block_number DESC LIMIT 1
</select>
<select id="selectMinBlockNumber" resultType="BigInteger">
SELECT block_number FROM
<include refid="tableName"/>
ORDER BY block_number ASC LIMIT 1
</select>
</mapper>