Explorar el Código

中煤登录密码错误时返回具体报错信息

Qchen hace 3 semanas
padre
commit
94e642fa3a

+ 3 - 0
tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quotation/zhongmei/crawler/component/ZmCrawlerRequestComponent.java

@@ -160,6 +160,9 @@ public class ZmCrawlerRequestComponent {
             map.expire(Duration.ofMinutes(CacheConstant.ZHONGMEI_AUTHORIZATION_TIME));
             return authorizationMap.get(AUTHORIZATION);
         }
+        if (authenticateResponse.getHead().getReturnCode().equals("-1") && authenticateResponse.getHead().getReturnMessage().contains("登录失败,用户名或者密码错误")) {
+            throw new SystemException(authenticateResponse.getHead().getReturnMessage());
+        }
         loginsNumber = loginsNumber - 1;
         if (loginsNumber <= 0) {
             throw new SystemException(authenticateResponse.getHead().getReturnMessage());