Pu Zhibing
5 天以前 ffe705d1fe2c4fa60d457f94b3e2be0cfeaf24c0
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/EnterpriseUtil.java
@@ -2,6 +2,7 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
import com.open.common.util.OpenApiClient;
import com.open.common.util.SystemParameterNames;
import com.stylefeng.guns.modular.system.util.qianyuntong.model.*;
@@ -187,7 +188,7 @@
      map.put(SystemParameterNames.getMessage_id(), messageId);
      map.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
      map.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
      map.put("content", JSON.toJSONString(request));
      map.put("content", new Gson().toJson(request));
      log.info("【修改企业基本信息】请求地址:" + url);
      log.info("【修改企业基本信息】请求参数:" + JSON.toJSONString(map));
      String result = OpenApiClient.sendCommonHttpRequst(url, headers, "GET", skprivateKeyFile, timeStamp, map);
@@ -196,7 +197,7 @@
      String status = jsonObject.getString("status");
      if (!"0".equals(status)) {
         log.error("【修改企业基本信息】请求失败:" + result);
         throw new RuntimeException("【修改企业基本信息】请求失败:" + result);
         return false;
      }
      return true;
   }
@@ -228,7 +229,7 @@
      map.put(SystemParameterNames.getMessage_id(), messageId);
      map.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
      map.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
      map.put("content", JSON.toJSONString(request));
      map.put("content", new Gson().toJson(request));
      
      log.info("【创建企业】请求地址:" + url);
      log.info("【创建企业】请求参数:" + JSON.toJSONString(map));
@@ -238,13 +239,13 @@
      String retCode = jsonObject.getString("retCode");
      if (!"0".equals(retCode)) {
         log.error("【创建企业】请求失败:" + result);
         throw new RuntimeException("【创建企业】请求失败:" + result);
         return null;
      }
      JSONObject object = jsonObject.getJSONObject("object");
      String status = object.getString("status");
      if (!"0".equals(status)) {
         log.error("【创建企业】失败:" + object.toJSONString());
         throw new RuntimeException("【创建企业】失败:" + object.toJSONString());
         log.error("【创建企业】请求失败:" + result);
         return null;
      }
      return object.getObject("data", CreateEnterprise.class);
   }