소스 검색

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));