feat: 增加测试接口
parent
ec93dff9dc
commit
9fdf8ad991
@ -0,0 +1,39 @@
|
||||
package com.xydl.cac.controller;
|
||||
|
||||
import com.xydl.cac.model.Response;
|
||||
import com.xydl.cac.service.IcdFileConfigService;
|
||||
import com.xydl.cac.socket.WebSocketServer;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@Api(tags = {"测试接口"})
|
||||
@RequestMapping("test")
|
||||
@Slf4j
|
||||
public class TestController extends BasicController {
|
||||
|
||||
@Resource
|
||||
IcdFileConfigService configService;
|
||||
@Resource
|
||||
WebSocketServer webSocketServer;
|
||||
|
||||
@GetMapping("compare61850")
|
||||
@ApiOperation("比对61850的不同点")
|
||||
public Response<List<String>> compare61850() throws Exception {
|
||||
List<String> result = configService.compare61850();
|
||||
return Response.success(result);
|
||||
}
|
||||
|
||||
@GetMapping("sendMsg")
|
||||
@ApiOperation("发送消息")
|
||||
public void sendMsg(String msg) {
|
||||
webSocketServer.sendMessage(msg);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue