package com.gyee.wisdom.dataadapter.domain.thing;

import com.gyee.wisdom.common.data.windturbine.Windturbine;
import com.gyee.wisdom.dao.windturbine.IWindturbineDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WindturbineService {
    @Autowired
    protected IWindturbineDao jpawindturbineDao;

    /**
     * del:删除数据
     *
     * @param id
     */
    public void delete(String id) {
        jpawindturbineDao.del(id);
    }

    /**
     * chan:修改数据
     *
     * @param windturbine
     */
    public void save(Windturbine windturbine) {
        jpawindturbineDao.save(windturbine);

    }

    /**
     * seleall:查询全部
     */
    public List<Windturbine> find() {
        List<Windturbine> lw = jpawindturbineDao.find();
        return lw;
    }

    /**
     * seleone:查询单个
     */
    public Windturbine findbyid(String id) {
        return jpawindturbineDao.findbyid(id);
    }

    public List<Windturbine> findByStationId(String stationId) {
        return jpawindturbineDao.findByStationId(stationId);
    }

    public List<Windturbine> findByModelId(String modelId) {
        return jpawindturbineDao.findByModelId(modelId);
    }

    public List<Windturbine> queryWindturbine(String stationId, String modelId) {
        return jpawindturbineDao.findByStationIdAndModelId(stationId, modelId);
    }




}
