whycrzg
2021-04-25 e376d5f2831e676b59ff92f7af9272b68cf11531
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
package com.whyc.app.controller;
 
import com.whyc.app.service.ServerService;
import com.whyc.dto.Response;
import com.whyc.pojo.Server;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*;
 
@RestController("APP-ServerController")
@RequestMapping("phone/server")
@Api(tags = "服务器IP")
public class ServerController {
 
    @Qualifier("SER-ServerService")
    @Autowired
    ServerService serverService ;
 
 
    @GetMapping("ip")
    @ApiOperation(value = "获取服务器IP")
    public Response getServerIP(){
        return serverService.getServerIP();
    }
 
    @PutMapping("ip")
    @ApiOperation(value = "更新服务器IP")
    public boolean updateServerIP(@RequestParam String ip){
 
        return  serverService.updateServerIP(ip);
 
    }
 
}