package com.steerinfo.ems.trmenergy.service.impl;

import com.steerinfo.ems.trmenergy.mapper.TRmEnergyMapper;
import com.steerinfo.ems.trmenergy.model.TRmEnergy;
import com.steerinfo.ems.trmenergy.service.ITRmEnergyService;
import com.steerinfo.framework.mapper.IBaseMapper;
import com.steerinfo.framework.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * TRmEnergy服务实现：
 * @author 王金涛
 * @version 1.0-SNAPSHORT 2019-10-11
 * 类描述
 * 修订历史：
 * 日期：2019-10-11
 * 作者：王金涛
 * 参考：
 * 描述：TRmEnergy服务实现
 * @see null
 * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
 */
@Service(value = "tRmEnergyService")
public class TRmEnergyServiceImpl extends BaseServiceImpl<TRmEnergy, String> implements ITRmEnergyService {

    @Autowired
    private TRmEnergyMapper tRmEnergyMapper;

    @Override
    protected IBaseMapper<TRmEnergy, String> getMapper() {
        return tRmEnergyMapper;
    }

    public List<TRmEnergy> getParent(){
        List<TRmEnergy> rows = tRmEnergyMapper.getParent();
        return rows;
    }


    /**
     * 查询 name and id
     * @return
     */
    @Override
    public List<TRmEnergy> selectNameAndId(Map<String, Object> parameters) {
        return tRmEnergyMapper.selectNameAndId(parameters);
    }

    public String getMaxId(TRmEnergy model){
        return tRmEnergyMapper.getMaxId(model);
    }

    public Short getMaxSeqno(){
        return  tRmEnergyMapper.getMaxSeqno();
    }
}
