|
@@ -142,10 +142,16 @@ public class SceneController extends BaseController {
|
|
@GetMapping("removes/{ids}")
|
|
@GetMapping("removes/{ids}")
|
|
public Result removes(@PathVariable String ids) {
|
|
public Result removes(@PathVariable String ids) {
|
|
List<SceneEntity> entities = sceneService.findByIds(ids);
|
|
List<SceneEntity> entities = sceneService.findByIds(ids);
|
|
|
|
+ String filePath;
|
|
for (SceneEntity entity: entities) {
|
|
for (SceneEntity entity: entities) {
|
|
|
|
+ filePath = entity.getPath();
|
|
entity.setRecStatus("I");
|
|
entity.setRecStatus("I");
|
|
entity.setUpdateTime(new Date());
|
|
entity.setUpdateTime(new Date());
|
|
sceneService.update(entity);
|
|
sceneService.update(entity);
|
|
|
|
+
|
|
|
|
+ // 2022-5-16 物理删除-删除服务器文件
|
|
|
|
+ FileUtil.del(filePath);
|
|
|
|
+ log.info("删除文件地址:{}", filePath);
|
|
}
|
|
}
|
|
|
|
|
|
return Result.success();
|
|
return Result.success();
|
|
@@ -193,6 +199,10 @@ public class SceneController extends BaseController {
|
|
|
|
|
|
QiniuOssUtil.upload(filePath, OSS_PATH + path);
|
|
QiniuOssUtil.upload(filePath, OSS_PATH + path);
|
|
log.info("oss文件上传完成 ");
|
|
log.info("oss文件上传完成 ");
|
|
|
|
+
|
|
|
|
+ // 2022-5-16 物理删除-删除服务器文件
|
|
|
|
+ FileUtil.del(filePath);
|
|
|
|
+ log.info("删除文件地址:{}", filePath);
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|