package com.gyee.wisdom.alarm.sharding.controller;

import com.gyee.wisdom.alarm.sharding.entity.AlarmUser;
import com.gyee.wisdom.alarm.sharding.entity.EarlyWarnScore;
import com.gyee.wisdom.alarm.sharding.service.EarlyWarnScoreService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/earlywarnscore")
@CrossOrigin
public class EarlyWarnScoreController {

    @Autowired
    private EarlyWarnScoreService earlyWarnScoreService;

    @GetMapping(value = "/list")
    public List<EarlyWarnScore> getListEarlyWarnScore(@RequestParam(value = "windturbineid", required = false) String windturbineid) {
        List<EarlyWarnScore> lst = earlyWarnScoreService.getListEarlyWarnScore(windturbineid);
        return lst;
    }
}
