| | |
| | | |
| | | 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(); |
| | |
| | | } |
| | | } 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; |
| | | } |
| | | |