| | |
| | | |
| | | @ApiOperation(value = "移除台站下文件(单个文件)") |
| | | @GetMapping("delFileFromStation") |
| | | public Response delFileFromStation(@RequestParam String stationName,@RequestParam(required = false) String FilePath){ |
| | | return service.delFileFromStation(stationName,FilePath); |
| | | public Response delFileFromStation(@RequestParam String stationName,@RequestParam(required = false) Integer fileId){ |
| | | return service.delFileFromStation(stationName,fileId); |
| | | } |
| | | } |
| | |
| | | } |
| | | //移除台站下文件(单个文件) |
| | | @Transactional |
| | | public Response delFileFromStation(String stationName, String filePath) { |
| | | public Response delFileFromStation(String stationName, Integer fileId) { |
| | | //1.先查出机房的id |
| | | Integer stationId=mapper.selectIdByName(stationName); |
| | | if(stationId==null){ |
| | |
| | | }else if(stationId==0){ |
| | | return new Response().set(1,false,"机房下不存在文件"); |
| | | }else { |
| | | //2.查出文件对应的文件id |
| | | Integer fileId=infoMapper.selectFileId(stationId,filePath); |
| | | /*//2.查出文件对应的文件id |
| | | Integer fileId=infoMapper.selectFileId(stationId,filePath);*/ |
| | | if(fileId==null||fileId==0){ |
| | | return new Response().set(1,false,"文件不存在"); |
| | | }else{ |