package com.gyee.frame.controller.comm;

import com.gyee.frame.common.domain.AjaxResult;
import com.gyee.frame.model.auto.Windturbine;
import com.gyee.frame.service.WindturbineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/windturbine")
public class WindturbineController {


    @Autowired
    private WindturbineService windturbineService;

    @GetMapping("/getWindturbine")
    public AjaxResult getWindturbine(String windturbineid) {
        Windturbine windturbine = windturbineService.selectByPrimaryKey(windturbineid);

        if(null != windturbine){
            return  AjaxResult.successData(200, windturbine);
        }

        return AjaxResult.error();
    }
}
