| | |
| | | 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 |
| | | @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); |
| | | |
| | |
| | | } |
| | | |
| | | @DeleteMapping("/") |
| | | @ApiOperation(notes = "",value="删除") |
| | | public ServiceModel delete(@RequestBody Server_state state) { |
| | | ServiceModel model = service.delete(state); |
| | | |
| | | return model; |
| | | } |
| | | |
| | | @GetMapping("byCondition") |
| | | @PostMapping("byCondition") |
| | | @ApiOperation(notes = "",value="byCondition") |
| | | public ServiceModel serchByCondition(@RequestBody Server_state state){ |
| | | ServiceModel model = service.serchByCondition(state); |
| | | |
| | |
| | | } |
| | | |
| | | @GetMapping("all") |
| | | @ApiOperation(notes = "",value="查询系统的cpu,内存使用率") |
| | | public ServiceModel searchAll(){ |
| | | ServiceModel model = service.searchAll(); |
| | | |