lxw
2023-11-13 b797f9f4be5ef3d949e8ef9758b3cad973ec33c0
src/main/java/com/whyc/controller/DevUpdateStateController.java
@@ -1,11 +1,33 @@
package com.whyc.controller;
import com.whyc.pojo.DevUpdateState;
import com.whyc.pojo.Response;
import com.whyc.service.DevUpdateStateService;
import com.whyc.util.ActionUtil;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
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;
@RequestMapping("devUpdate")
@RestController
@Api(tags = "设备升级")
public class DevUpdateStateController {
    @Autowired
    private DevUpdateStateService service;
    @ApiOperation(value = "远程升级")
    @PostMapping("updateDfu")
    //@ApiImplicitParam(name = "file", value = "远程升级", dataTypeClass = MultipartFile.class, required = true,paramType = "form")
    public Response updateDfu(@RequestParam(value = "file") MultipartFile file, @RequestParam int devId){
        return service.updateDfu(file,devId);
    }
    @ApiOperation(value = "远程升级停止")
    @GetMapping("stopDfu")
    public Response stopDfu(@RequestParam int devId){
        return service.stopDfu(devId);
    }
}