Kaynağa Gözat

修改获取异步任务结果判断

yusm 5 ay önce
ebeveyn
işleme
5552fcdf9b

+ 7 - 3
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java

@@ -244,9 +244,13 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
         System.out.println(resp);
         JSONObject json = JSONObject.parseObject(resp);
         if(json.getIntValue("errcode")==0){
-            JSONObject result = (JSONObject) json.get("result");
-            JSONObject contact_id_translate = (JSONObject) result.get("contact_id_translate");
-            resultUrl = contact_id_translate.getString("url");
+            if (json.getIntValue("status")==3){
+                JSONObject result = (JSONObject) json.get("result");
+                JSONObject contact_id_translate = (JSONObject) result.get("contact_id_translate");
+                resultUrl = contact_id_translate.getString("url");
+            }else {
+                throw new Exception(json.toJSONString());
+            }
         }else {
             throw new Exception(json.toJSONString());
         }