优化BUG 三项数据库修改报错

dev
xiepeng 2024-06-05 18:00:21 +08:00
parent 013dd6e242
commit 997da4fe66
2 changed files with 10 additions and 7 deletions

View File

@ -153,12 +153,15 @@ public class TextLibraryController extends BaseController {
.filter(data -> dataList.stream()
.noneMatch(craft -> StringUtils.equals(data.getString("CATEGORY_ID"), craft.getString("CATEGORY_ID"))))
.collect(Collectors.toList());
PageData data = resultList.get(0);
if (!ObjectUtil.isEmpty(data)) {
findChildren(craftList, data, resultList);
}
for (PageData pageData : varList) {
pageData.put("SPECIFICATION_TYPES", resultList);
if(!CollectionUtils.isEmpty(resultList)) {
PageData data = resultList.get(0);
if (!ObjectUtil.isEmpty(data)) {
findChildren(craftList, data, resultList);
}
for (PageData pageData : varList) {
pageData.put("SPECIFICATION_TYPES", resultList);
}
}
map.put("varList", varList);
map.put("page", page);

View File

@ -163,7 +163,7 @@ public class TextLibraryServiceImpl implements TextLibraryService {
String path = smb.saveFile(file[0]);
condition.put("PATH", path);
}
if (StringUtils.isNotBlank(condition.getString("BUS_TEXT_LIBRARY_ID")) && StringUtils.isEmpty(condition.getString("ISADD"))) {
if (StringUtils.isNotBlank(condition.getString("BUS_TEXT_LIBRARY_ID")) && StringUtils.equals(condition.getString("OPERATE"), "edit")) {
// 保存历史文件
PageData entity = textlibraryMapper.findById(condition);
condition.put("REMOTE_FILE_NAME", Warden.getFileName(condition.getString("PATH")));