package com.gyee.wisdom.dao.sql.power;

import com.gyee.wisdom.common.data.DataUtil;
import com.gyee.wisdom.common.data.power.WindturbinePowerCurvefitting;
import com.gyee.wisdom.dao.power.IWindturbinePowerCurvefittingDao;
import com.gyee.wisdom.dao.sql.power.repository.WindturbinePowerCurvefittingRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;


@Component
public class JpaWindturbinePowerCurvefittingDao implements IWindturbinePowerCurvefittingDao {

    @Autowired
    private WindturbinePowerCurvefittingRepository windturbinePowerCurvefittingRepository;

    @Override
    public List<WindturbinePowerCurvefitting> findByWindturbineId(String windturbineId) {
        //return null;
        return DataUtil.convertDataList(windturbinePowerCurvefittingRepository.queryData(windturbineId));
    }


}
