漏洞修复
This commit is contained in:
parent
c422864e43
commit
ad9b37db63
|
@ -67,8 +67,6 @@ public class GetSheetService {
|
|||
Cell cell = iterator.next();
|
||||
title = (title == null || title.isEmpty() ? new StringBuilder() : title).append(cell.toString());
|
||||
}
|
||||
// 获取 Header
|
||||
Iterator<Cell> headerRow = getEntitySheet.getRow(1).cellIterator();
|
||||
// 获取总行数
|
||||
ArrayList<ArrayList<Object>> line = new ArrayList<>();
|
||||
String[] rowMax = new String[getEntitySheet.getRow(1).getPhysicalNumberOfCells()];
|
||||
|
|
|
@ -7,6 +7,7 @@ import com.wxjw.dal.pojo.ErrorCode;
|
|||
import com.wxjw.dal.pojo.data.RetrieveFiles.InsertTableData;
|
||||
import com.wxjw.dal.pojo.entity.ExcelInfoEntity;
|
||||
import lombok.Getter;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -26,7 +27,7 @@ public class InsertTableService {
|
|||
@Getter
|
||||
private String validationErrorMessage = null;
|
||||
|
||||
public void insertLogic(InsertTableData resultBody, ExcelInfoMapper excelInfoMapper) {
|
||||
public void insertLogic(@NotNull InsertTableData resultBody, @NotNull ExcelInfoMapper excelInfoMapper) {
|
||||
// 搜索数据是否存在
|
||||
ArrayList<ExcelInfoEntity> excelInfoList = (ArrayList<ExcelInfoEntity>) excelInfoMapper.getAllExcelFilesNameNoRepetition(resultBody.getFile_name());
|
||||
if (!excelInfoList.isEmpty()) {
|
||||
|
|
|
@ -112,8 +112,11 @@ public class UploadSheetService {
|
|||
.setUpdateBy(excelInfo.getUpdateBy())
|
||||
.setCreateTime(excelInfo.getCreateTime())
|
||||
.setUpdateBy(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
|
||||
excelInfoMapper.updateExcelInfo(excelInfoUpdate);
|
||||
returnResult = ResultUtil.success();
|
||||
if (excelInfoMapper.updateExcelInfo(excelInfoUpdate)) {
|
||||
returnResult = ResultUtil.success();
|
||||
} else {
|
||||
returnResult = ResultUtil.error(ErrorCode.DATA_UPDATE_FAILURE);
|
||||
}
|
||||
} else {
|
||||
returnResult = ResultUtil.error(ErrorCode.DATA_IS_EMPTY);
|
||||
}
|
||||
|
|
Reference in New Issue
Block a user