whycrzg
2021-04-01 83d5ece2fbdf3e5db0ca0b990d372944c458155e
src/main/java/com/whyc/service/ProjectArchiveManageService.java
@@ -48,10 +48,11 @@
    public Response delDocumentation(ProjectArchiveManage pam) {
        Response<Object> response = new Response<>();
        boolean bl;
        try {
            projectArchiveManageMapper.delDocumentation(pam);
            bl = projectArchiveManageMapper.delDocumentation(pam) > 0;
            File file = new File(pam.getProFilePath());
            if (file.exists()){
            if (file.exists()) {
                File absoluteFile = file.getAbsoluteFile();
                String name = absoluteFile.getName();
                file.delete();
@@ -62,9 +63,14 @@
            }
        } catch (Exception e) {
            e.printStackTrace();
            return response.setMsg(0,"删除失败");
            return response.setMsg(0, "删除失败");
        }
        response.setMsg(1,"删除成功");
        if (bl) {
            response.setMsg(1, "删除成功");
        } else {
            response.setMsg(0, "删除失败");
        }
        return response;
    }