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

import com.gyee.wisdom.common.data.DataUtil;
import com.gyee.wisdom.common.data.control.InputOrOutputSpeedTotal;
import com.gyee.wisdom.dao.control.IInputOrOutputSpeedTotalDao;
import com.gyee.wisdom.dao.sql.control.repository.InputOrOutputSpeedTotalRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.xml.crypto.Data;
import java.util.Date;
import java.util.List;

/**
 * @descrition:
 * @author:Wanghs
 * @date:2019-09-10
 */
@Component
public class JpaInputOrOutputSpeedTotalDao implements IInputOrOutputSpeedTotalDao {

    @Autowired
    private InputOrOutputSpeedTotalRepository inputOrOutputSpeedTotalRepository;

    @Override
    public List<InputOrOutputSpeedTotal> getSmallSpeed( ) {
      return DataUtil.convertDataList(inputOrOutputSpeedTotalRepository.latest());

    }

}
