lxw
2022-09-13 c5538e9c8f0f3a2a6c5f5b8caad3eef25ee0b8f3
src/main/java/com/whyc/controller/SoftwareController.java
@@ -35,8 +35,7 @@
        if(!name.substring(name.length()-4).equals(".xls") && !name.substring(name.length()-5).equals(".xlsx")){
            response.set(1,false,"文件解析错误:上传格式非excel格式");
        }else{
            List<Software> list = service.excelParse(multipartFile.getInputStream());
            response.setII(1,true,list,"文件解析成功");
            response =  service.excelParse(multipartFile.getInputStream());
        }
        return response;
    }
@@ -48,6 +47,13 @@
        return service.upload(file1,file2,softwareList);
    }
    @ApiOperation("更新软件版本对应的适用机型")
    @PutMapping("applyModel")
    public Response updateApplyModel(@RequestParam MultipartFile multipartFile,@RequestParam String softwareStr) throws IOException {
        List<Software> softwareList = ActionUtil.getGson().fromJson(softwareStr,new TypeToken<List<Software>>(){}.getType());
        return service.updateApplyModel(multipartFile,softwareList);
    }
    @ApiOperation(value = "查询软件列表的信息")
    @GetMapping("getAllSoftware")
    public Response getAllSoftware(@RequestParam(required = false) String fileName,