lxw
2023-04-25 a3dd5e747bc4b8e8ceaead18f1055c07f51a0cf0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.UserInf;
import com.whyc.service.HomePageService;
import com.whyc.service.ServerStateService;
import com.whyc.util.ActionUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
 
@RestController
@RequestMapping("HomePage")
@Api(tags = "首页-告警")
public class HomePageController {
    @Resource
    private HomePageService service;
    @Resource
    private ServerStateService serverStateService;
 
    @GetMapping("/getDataMap")
    @ApiOperation(value = "获取告警")
    public Response getDataMap(){
        UserInf userInf = ActionUtil.getUser();
        return service.getDataMap(userInf.getUId().intValue());
    }
}