| | |
| | | } |
| | | //删除图 |
| | | public void delPic(int num, int picNum,String picUrl,String newPicUrl) { |
| | | String rootFile = CommonUtil.getRootFile();//主路径 |
| | | UpdateWrapper wrapper=new UpdateWrapper(); |
| | | wrapper.eq("num",num); |
| | | if(picNum==1){ |
| | |
| | | wrapper.set("bom_agreement",newPicUrl); |
| | | } |
| | | int flag=mapper.update(null,wrapper); |
| | | if(flag>0){ |
| | | rootFile=rootFile.replace("doc_file",""); |
| | | if(flag>0&&picUrl.length()>0){ |
| | | String rootFile = CommonUtil.getRootFile();//主路径 |
| | | picUrl=picUrl.replace("doc_file",""); |
| | | //删除图片 |
| | | FileUtil.deleteFile(new File(rootFile+picUrl)); |
| | | } |