whyclxw
2025-03-29 b2304cfc3342211dfd161de427879fa813a22a44
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
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.ConnectInf;
import com.whyc.service.ConnectInfService;
import com.whyc.util.ActionUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
 
@RestController
@RequestMapping("ConnectInf")
@Api(tags = "ide控制")
public class ConnectInfController {
    @Autowired
    private ConnectInfService service;
 
    @ApiOperation("发送读取ide节点数据命令")
    @PostMapping("sendNode")
    public Response sendNode(@RequestParam(value = "file",required = false) MultipartFile file,@RequestParam String json){
        ConnectInf cinf= ActionUtil.getGson().fromJson(json,ConnectInf.class);
        return service.sendNode(file,cinf);
    }
 
    @ApiOperation("ide断开链接")
    @GetMapping("breakNode")
    public Response breakNode(){
        return service.breakNode();
    }
}