package com.ruoyi.web.modules.industryservice.controller;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.web.modules.industryservice.domain.BizYakDiseaseWarning;
import com.ruoyi.web.modules.industryservice.service.IBizYakDiseaseWarningService;

/**
 * 移动端健康预警
 */
@RestController
@RequestMapping("/app/healthAlert")
public class BizAppHealthAlertController extends BaseController
{
    @Autowired
    private IBizYakDiseaseWarningService bizYakDiseaseWarningService;

    @GetMapping("/list")
    public TableDataInfo list(BizYakDiseaseWarning query)
    {
        startPage();
        List<BizYakDiseaseWarning> list = bizYakDiseaseWarningService.selectBizYakDiseaseWarningList(query);
        return getDataTable(list);
    }

    @GetMapping("/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(bizYakDiseaseWarningService.selectBizYakDiseaseWarningById(id, null));
    }
}
