ソースを参照

fix:我爱巡接口报错

459242451@qq.com 3 年 前
コミット
ccb9c0f3e9

+ 6 - 2
ruoyi-system/src/main/java/com/ruoyi/qdtl/service/impl/QdCommonServiceImpl.java

@@ -75,8 +75,8 @@ public class QdCommonServiceImpl implements IQdCommonService {
         JSONObject postJson = JSONUtil.parseObj(post);
         if (200 == postJson.getInt("code")) {
             token = postJson.getStr("data");
-            // 存入缓存。暂定为6小时过期
-            redisCache.setCacheObject("xun:token", token, 6, TimeUnit.HOURS);
+            // 存入缓存。暂定为1小时过期
+            redisCache.setCacheObject("xun:token", token, 1, TimeUnit.HOURS);
         } else {
             log.error("获取xun接口的token失败:{}", postJson);
             throw new ServiceException("获取xun接口的token失败");
@@ -97,6 +97,7 @@ public class QdCommonServiceImpl implements IQdCommonService {
             JSONArray data = getJson.getJSONArray("data");
             return data;
         }
+        log.error("调用我爱巡接口报错:{}", getJson);
         return new JSONArray();
     }
 
@@ -126,6 +127,7 @@ public class QdCommonServiceImpl implements IQdCommonService {
                 return data.getJSONArray("rows");
             }
         }
+        log.error("调用我爱巡接口报错:{}", getJson);
         return null;
     }
 
@@ -146,6 +148,7 @@ public class QdCommonServiceImpl implements IQdCommonService {
                 return data.getJSONArray("rows");
             }
         }
+        log.error("调用我爱巡接口报错:{}", getJson);
         return null;
     }
 
@@ -156,6 +159,7 @@ public class QdCommonServiceImpl implements IQdCommonService {
         if (200 == getJson.getInt("code")) {
             return getJson.getJSONArray("data");
         }
+        log.error("调用我爱巡接口报错:{}", getJson);
         return null;
     }