package com.gyee.generation.service.auto.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gyee.generation.mapper.auto.ProEconWindturbineStatusMapper;
import com.gyee.generation.model.auto.ProEconWindturbineStatus;
import com.gyee.generation.service.auto.IProEconWindturbineStatusService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;

/**
 * <p>
 * 与停机事件关联（限电停机时），数据库中无关联，程序控制 服务实现类
 * </p>
 *
 * @author shilin
 * @since 2022-10-21
 */
@Service
public class ProEconWindturbineStatusServiceImpl extends ServiceImpl<ProEconWindturbineStatusMapper, ProEconWindturbineStatus> implements IProEconWindturbineStatusService {

    @Resource
    private ProEconWindturbineStatusMapper proEconWindturbineStatusMapper;

    public int updateWindturbineStatus(Date start_time, Double loss_power, Double stop_hours, Long id) {
        int i = 0;
        i = proEconWindturbineStatusMapper.updateWindturbineStatus(start_time, loss_power, stop_hours, id);
        return i;
    }
}
