whyclxw
2024-01-30 3c045c86613064f592208707d47dd43f9c918930
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
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")
    //@ApiImplicitParam(name = "file", value = "上传的文件", dataTypeClass = MultipartFile.class, required = false,paramType = "form")
    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);
    }
}