kms批量刷新部门的时候出现空指针异常修改

This commit is contained in:
Mr-wang 2023-07-03 19:55:49 +08:00
parent c5739637df
commit 78f28f7bdf

View File

@ -173,10 +173,15 @@ public class RepositoryAttribute {
inputValue = StringUtils.join(deptValList, ",");
}
inputValue = inputValue.replaceAll("'", "'");
inputValue = inputValue.replaceAll("\"", """);
attrObj.put("text", inputValue);
result.put(attributeModel.getKey(), attrObj);
if (UtilString.isNotEmpty(inputValue)){
inputValue = inputValue.replaceAll("'", "'");
inputValue = inputValue.replaceAll("\"", """);
attrObj.put("text", inputValue);
result.put(attributeModel.getKey(), attrObj);
}else {
attrObj.put("text", inputValue);
result.put(attributeModel.getKey(), attrObj);
}
}
}
return result;