deason 3 年 前
コミット
646c76ccf1

+ 11 - 10
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamScoreObtainQueueServiceImpl.java

@@ -98,29 +98,30 @@ public class ExamScoreObtainQueueServiceImpl implements ExamScoreObtainQueueServ
         if (rootOrgId == null) {
             return notifyUrlInfo;
         }
+
         String notifyUrlKey = Constants.OE_EXAM_SCORE_NOTIFY_URL_PREFIX + rootOrgId;
-        String notifyUrlMethodKey = Constants.OE_EXAM_SCORE_NOTIFY_URL_HTTP_METHOD_PREFIX + rootOrgId;
         SysPropertyCacheBean notifyUrlKeyProperty = CacheHelper.getSysProperty(notifyUrlKey);
+
+        String notifyUrlMethodKey = Constants.OE_EXAM_SCORE_NOTIFY_URL_HTTP_METHOD_PREFIX + rootOrgId;
         SysPropertyCacheBean notifyUrlMethodKeyProperty = CacheHelper.getSysProperty(notifyUrlMethodKey);
-        //默认http调用方式:post
-        HttpMethod defaultHttpMethod = HttpMethod.POST;
-        if (!notifyUrlKeyProperty.getHasValue() || !notifyUrlKeyProperty.getHasValue()) {
-            log.error("ExamScoreObtainQueueServiceImpl-sendNotifyError001,未找到组织机构id为:" + rootOrgId + "的配置路径");
-        } else {
+
+        if (notifyUrlKeyProperty != null && notifyUrlKeyProperty.getHasValue()) {
             notifyUrlInfo.setNotifyUrl(notifyUrlKeyProperty.getValue().toString());
+        } else {
+            log.warn("成绩推送信息:{} 未配置!", notifyUrlKey);
         }
+
         if (null != notifyUrlMethodKeyProperty && null != notifyUrlMethodKeyProperty.getValue()) {
             try {
                 notifyUrlInfo.setHttpMethod(HttpMethod.valueOf(notifyUrlMethodKeyProperty.getValue().toString()));
             } catch (Exception e) {
-                log.error("ExamScoreObtainQueueServiceImpl-sendNotifyError002,notifyUrlMethodKey:" + notifyUrlMethodKey + "格式不正确");
+                log.warn("成绩推送信息:{} 配置有误!", notifyUrlMethodKey);
             }
         } else {
-            notifyUrlInfo.setHttpMethod(defaultHttpMethod);
+            notifyUrlInfo.setHttpMethod(HttpMethod.POST);
         }
-        return notifyUrlInfo;
 
+        return notifyUrlInfo;
     }
 
-
 }