|
@@ -198,7 +198,7 @@ public class HandlerFormDataUtils {
|
|
|
* @param result result
|
|
|
* @param showData showData
|
|
|
*/
|
|
|
- public static void handleNullColumn(List<JSONObject> result, JSONArray showData) {
|
|
|
+ public static void handleNullColumnValue(List<JSONObject> result, JSONArray showData) {
|
|
|
for (JSONObject jsonObject : result) {
|
|
|
Set<String> resultKeySet = jsonObject.keySet();
|
|
|
for (Object columnNameObj : showData) {
|
|
@@ -216,12 +216,12 @@ public class HandlerFormDataUtils {
|
|
|
* @param result result
|
|
|
* @param showData showData
|
|
|
*/
|
|
|
- public static void handleNullTableColumn(List<GenTableColumn> result, List<String> showData) {
|
|
|
- List<String> dbColumnNameList = map(result, GenTableColumn::getColumnName);
|
|
|
- for (GenTableColumn tableColumn : result) {
|
|
|
+ public static void handleNullColumnValue(List<JSONObject> result, List<String> showData) {
|
|
|
+ for (JSONObject jsonObject : result) {
|
|
|
+ Set<String> resultKeySet = jsonObject.keySet();
|
|
|
for (String columnName : showData) {
|
|
|
- if (!dbColumnNameList.contains(columnName)) {
|
|
|
- tableColumn.setColumnValue("");
|
|
|
+ if (!resultKeySet.contains(columnName)) {
|
|
|
+ jsonObject.put(columnName, "");
|
|
|
}
|
|
|
}
|
|
|
}
|