package com.fzm.mall.server.admin.block_chain.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fzm.mall.server.admin.block_chain.mapper.HeightMapper;
import com.fzm.mall.server.admin.block_chain.model.Height;
import com.fzm.mall.server.admin.block_chain.service.IHeightService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 当前解析链的高度 服务实现类
 * </p>
 *
 * @author fzm
 * @since 2021-09-14
 */
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class HeightServiceImpl extends ServiceImpl<HeightMapper, Height> implements IHeightService {

    private final HeightMapper heightMapper;

    @Override
    public Height getParaCurrentHeight(byte type) {
        return heightMapper.getCurrentHeightByType(type);
    }

}
