|
@@ -241,9 +241,9 @@ public class PrivateStandardServiceImpl extends ServiceImpl<PrivateStandardMappe
|
|
|
for (PrivateStandardDTO dto : data) {
|
|
|
// 获取当前对象需要的文件数量
|
|
|
int fileCount = dto.getFilesCount();
|
|
|
- if(allFiles != null && allFiles.length > 0){
|
|
|
- if(fileCount > 0 && fileIndex < allFiles.length){
|
|
|
- dto.setFile(allFiles[fileIndex++]);
|
|
|
+ if(files != null && files.size() > 0){
|
|
|
+ if(fileCount > 0 && fileIndex < files.size()){
|
|
|
+ dto.setFile(files.get(fileIndex++));
|
|
|
}
|
|
|
//先上传文件,上传成功在执行添加
|
|
|
if(dto.getFile() != null){
|
|
@@ -286,9 +286,8 @@ public class PrivateStandardServiceImpl extends ServiceImpl<PrivateStandardMappe
|
|
|
PrivateStandard privateStandard = BeanUtil.copyProperties(dto, PrivateStandard.class);
|
|
|
//修改
|
|
|
baseMapper.updateById(privateStandard);
|
|
|
- return true;
|
|
|
}
|
|
|
- return false;
|
|
|
+ return true;
|
|
|
} catch (Exception e) {
|
|
|
//删除之前上传的文件
|
|
|
if(CollectionUtils.isNotEmpty(standardFiles)){
|