فهرست منبع

fix:修改共通详情接口

xuezizhuo 1 سال پیش
والد
کامیت
14351de9f2
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CommonServiceImpl.java

+ 5 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CommonServiceImpl.java

@@ -290,7 +290,11 @@ public class CommonServiceImpl implements ICommonService {
         String tableName = (String) commonEntity.getBasicMap().get("tableName");
         Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getConditionMap()));
         CommonEntity common = new CommonEntity();
-        Map<String, Object> retMap = commonMapper.getInfoById(tableName, conditions).getResultMap();
+        CommonEntity commonEntity1 = commonMapper.getInfoById(tableName, conditions);
+        if(commonEntity1 == null){
+            return common;
+        }
+        Map<String, Object> retMap = commonEntity1.getResultMap();
         Map<String, Object> retMap1 = new HashMap<>();
         retMap.keySet().forEach(item -> {
             retMap1.put(toUnderScoreCase(item), retMap.get(item));