whycrzh
2021-01-28 c8332186836b3dfe1fbd32d7bec7cd29a57e1888
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package com.fgkj.controller.ram;
 
import com.fgkj.dto.ServiceModel;
import com.fgkj.dto.ram.Server_state;
import com.fgkj.services.ram.Server_stateService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
@RequestMapping("serverState")
@RestController
@Api(tags = "serverState接口")
public class Server_stateController{
 
    @Resource
    private Server_stateService service;
 
    @PostMapping("/")
    @ApiOperation(notes = "",value="新增")
    public ServiceModel add(@RequestBody Server_state state) {
        ServiceModel model = service.add(state);
        return model;
        
    }
 
    @PutMapping("/")
    @ApiOperation(notes = "",value="修改")
    public ServiceModel update(@RequestBody Server_state state) {
        ServiceModel model = service.update(state);
 
        return model;
    }
 
    @DeleteMapping("/")
    @ApiOperation(notes = "",value="删除")
    public ServiceModel delete(@RequestBody Server_state state) {
        ServiceModel model = service.delete(state);
 
        return model;
    }
 
    @PostMapping("byCondition")
    @ApiOperation(notes = "",value="byCondition")
     public ServiceModel serchByCondition(@RequestBody Server_state state){
         ServiceModel model = service.serchByCondition(state);
 
         return model;
    } 
 
    @GetMapping("all")
    @ApiOperation(notes = "",value="查询系统的cpu,内存使用率")
    public ServiceModel searchAll(){
         ServiceModel model = service.searchAll();
 
         return model;
    }
 
}