package com.nantian.cloud.jljc.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nantian.cloud.jljc.entity.TSupervisionUnitEnergyType;
import com.nantian.cloud.jljc.mapper.TSupervisionUnitEnergyTypeMapper;
import com.nantian.cloud.jljc.service.TSupervisionUnitEnergyTypeService;
import com.nantian.cloud.jljc.vo.Query;
import com.nantian.cloud.jljc.vo.TreeVo;
import org.springframework.stereotype.Service;

import java.util.List;

import static com.nantian.cloud.jljc.vo.util.TreeVoUtil.findTree;

/**
 * 节能监察单位产品种类 服务实现类
 * @since 2020-11-02
 */
@Service("tSupervisionUnitEnergyTypeService")
public class TSupervisionUnitEnergyTypeServiceImpl extends ServiceImpl<TSupervisionUnitEnergyTypeMapper, TSupervisionUnitEnergyType> implements TSupervisionUnitEnergyTypeService {

    @Override
    public List<TreeVo> getTree(Query query) {
        List<TreeVo> treevo =  baseMapper.getTree(query);
        return findTree(treevo);
    }
}
