feat: 增加测试接口

iec104
huangfeng 12 months ago
parent ec93dff9dc
commit 9fdf8ad991

@ -1,7 +1,6 @@
package com.xydl.cac.controller;
import com.xydl.cac.entity.IcdConfigType;
import com.xydl.cac.entity.IcdConfigTypeAtt;
import com.xydl.cac.exception.BusinessException;
import com.xydl.cac.model.ColumnModel;
import com.xydl.cac.model.IcdAttUpdateModel;
@ -113,11 +112,4 @@ public class IcdConfigController extends BasicController {
return Response.success("OK");
}
@GetMapping("compare61850")
@ApiOperation("比对61850的不同点")
public Response<List<String>> compare61850() throws Exception {
List<String> result = configService.compare61850();
return Response.success(result);
}
}

@ -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…
Cancel
Save