package com.fzm.mall.server.admin.block_chain.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fzm.mall.server.admin.block_chain.model.Height;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 当前解析链的高度 Mapper 接口
 * </p>
 *
 * @author fzm
 * @since 2021-09-14
 */
@Mapper
public interface HeightMapper extends BaseMapper<Height> {

    @Select("select * from block_chain_height where type = #{type} order by id asc limit 1")
    Height getCurrentHeightByType(byte type);

}
