企业标准产品标准附件重复问题
This commit is contained in:
@@ -24,4 +24,5 @@ public interface AttFileEODao extends BaseMapper<AttFileEO> {
|
||||
|
||||
public int insertData(AttFileEO attFileEO);
|
||||
|
||||
void deleteByIdInfo(String str, String id);
|
||||
}
|
||||
|
||||
@@ -32,4 +32,6 @@ public interface IAttFileEOService extends IService<AttFileEO> {
|
||||
public AttFileVo insertFileInfo(File file,String fileName);
|
||||
|
||||
void downLoadFileList(List<AttFileEO> multiFileInfos, String fileNowPath) throws IOException;
|
||||
|
||||
void deleteById(String id);
|
||||
}
|
||||
|
||||
@@ -23,10 +23,7 @@ import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
@Service("attFileEOService")
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
@@ -438,6 +435,17 @@ public class AttFileEOServiceImpl extends ServiceImpl<AttFileEODao, AttFileEO> i
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
if(StringUtils.isNotBlank(id)){
|
||||
String[] s = id.split("_");
|
||||
List<String> asList = Arrays.asList(s);
|
||||
String str = "att_file_"+asList.get(2);
|
||||
baseMapper.deleteByIdInfo(str,id);
|
||||
}
|
||||
}
|
||||
|
||||
public static void copyFile1(String srcPath, String destPath) throws IOException {
|
||||
// 打开输入流
|
||||
FileInputStream fis = new FileInputStream(srcPath);
|
||||
|
||||
Reference in New Issue
Block a user