Kaynağa Gözat

getFkMap handle null

shiqian 4 yıl önce
ebeveyn
işleme
8abb6b4a86

+ 4 - 1
boman-web-core/src/main/java/com/boman/web/core/utils/HandlerFormDataUtils.java

@@ -176,8 +176,11 @@ public class HandlerFormDataUtils {
         param.put(fkColumnName.toString(), value);
         param.put(fkColumnName.toString(), value);
         IBaseSelectService selectService = SpringUtils.getBean(IBaseSelectService.class);
         IBaseSelectService selectService = SpringUtils.getBean(IBaseSelectService.class);
         JSONObject fkInfo = selectService.getOneByMap(fkTableName.toString(), param);
         JSONObject fkInfo = selectService.getOneByMap(fkTableName.toString(), param);
-
         JSONObject result = new JSONObject();
         JSONObject result = new JSONObject();
+        if (isEmpty(fkInfo)) {
+            return result;
+        }
+
         Object fkValue = fkInfo.get(dkColumnName);
         Object fkValue = fkInfo.get(dkColumnName);
         result.put(SINGLE_OBJ_NAME, value);
         result.put(SINGLE_OBJ_NAME, value);
         result.put(SINGLE_OBJ_VALUE, fkValue);
         result.put(SINGLE_OBJ_VALUE, fkValue);