企业列表出来了

master
法外狂徒张三 2024-09-05 19:55:55 +08:00
parent 07d2c31f0b
commit 1b601222bc
3 changed files with 18 additions and 5 deletions

View File

@ -9,6 +9,9 @@
<change afterPath="$PROJECT_DIR$/logs/cloud-system/error.2024-09-03.log" afterDir="false" /> <change afterPath="$PROJECT_DIR$/logs/cloud-system/error.2024-09-03.log" afterDir="false" />
<change afterPath="$PROJECT_DIR$/logs/cloud-system/info.2024-09-02.log" afterDir="false" /> <change afterPath="$PROJECT_DIR$/logs/cloud-system/info.2024-09-02.log" afterDir="false" />
<change afterPath="$PROJECT_DIR$/logs/cloud-system/info.2024-09-03.log" afterDir="false" /> <change afterPath="$PROJECT_DIR$/logs/cloud-system/info.2024-09-03.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cloud-market-common/src/main/java/com/muyu/market/config/SimpleWeatherConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-market-common/src/main/java/com/muyu/market/config/SimpleWeatherConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cloud-market-common/src/main/java/com/muyu/market/config/ThirdPartyConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-market-common/src/main/java/com/muyu/market/config/ThirdPartyConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/logs/cloud-system/error.log" beforeDir="false" afterPath="$PROJECT_DIR$/logs/cloud-system/error.log" afterDir="false" /> <change beforePath="$PROJECT_DIR$/logs/cloud-system/error.log" beforeDir="false" afterPath="$PROJECT_DIR$/logs/cloud-system/error.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/logs/cloud-system/info.log" beforeDir="false" afterPath="$PROJECT_DIR$/logs/cloud-system/info.log" afterDir="false" /> <change beforePath="$PROJECT_DIR$/logs/cloud-system/info.log" beforeDir="false" afterPath="$PROJECT_DIR$/logs/cloud-system/info.log" afterDir="false" />
</list> </list>
@ -179,7 +182,7 @@
<workItem from="1725517357652" duration="1395000" /> <workItem from="1725517357652" duration="1395000" />
<workItem from="1725528983357" duration="20000" /> <workItem from="1725528983357" duration="20000" />
<workItem from="1725534330399" duration="6000" /> <workItem from="1725534330399" duration="6000" />
<workItem from="1725535072504" duration="924000" /> <workItem from="1725535072504" duration="1666000" />
</task> </task>
<task id="LOCAL-00001" summary="初始化"> <task id="LOCAL-00001" summary="初始化">
<created>1724047244829</created> <created>1724047244829</created>
@ -405,7 +408,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1725535995757</updated> <updated>1725535995757</updated>
</task> </task>
<option name="localTasksCounter" value="33" /> <task id="LOCAL-00033" summary="企业列表出来了">
<created>1725536412572</created>
<option name="number" value="00033" />
<option name="presentableId" value="LOCAL-00033" />
<option name="project" value="LOCAL" />
<updated>1725536412572</updated>
</task>
<option name="localTasksCounter" value="34" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">

View File

@ -50,7 +50,7 @@ public class SimpleWeatherConfig {
System.out.printf("风力:%s%n", realtime.getString("power")); System.out.printf("风力:%s%n", realtime.getString("power"));
System.out.printf("空气质量:%s%n", realtime.getString("aqi")); System.out.printf("空气质量:%s%n", realtime.getString("aqi"));
msg = String.valueOf(result); msg = String.valueOf(realtime);
} else { } else {
System.out.println("调用接口失败:" + jsonObject.getString("reason")); System.out.println("调用接口失败:" + jsonObject.getString("reason"));
} }

View File

@ -1,5 +1,7 @@
package com.muyu.market.config; package com.muyu.market.config;
import net.sf.json.JSONObject;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
@ -31,9 +33,10 @@ public class ThirdPartyConfig {
} }
in.close(); in.close();
connection.disconnect(); connection.disconnect();
JSONObject jsonObject = JSONObject.fromObject(response);
JSONObject result = jsonObject.getJSONObject("result");
// 返回HTTP 200 OK状态码和响应体 // 返回HTTP 200 OK状态码和响应体
return response.toString(); return String.valueOf(result);
} }