dcs há 4 meses atrás
pai
commit
360fede6fd

+ 6 - 0
virgo.api/src/main/java/com/bosshand/virgo/api/controller/WeeklyController.java

@@ -43,6 +43,12 @@ public class WeeklyController {
     }
 
     @ApiOperation(value = "周报详情", notes = "周报详情")
+    @RequestMapping(value = "/detail/{id}", method = RequestMethod.GET)
+    public Response getWeekly(@PathVariable long id) {
+        return Response.ok(weeklyService.get(id));
+    }
+
+    @ApiOperation(value = "周报类型列表", notes = "周报类型列表")
     @RequestMapping(value = "/type/{weeklyId}", method = RequestMethod.GET)
     public Response getWeeklyType(@PathVariable long weeklyId) {
         return Response.ok(weeklyService.getByWeeklyId(weeklyId));

+ 1 - 1
virgo.api/src/main/java/com/bosshand/virgo/api/job/JobCityWeatherQuartz.java

@@ -56,7 +56,7 @@ public class JobCityWeatherQuartz extends QuartzJobBean {
         String url = "https://www.weatherol.cn/api/home/getCurrAnd15dAnd24h?cityid=" + weatherCityCode;
         String result = HttpsUtils.getResult(url);
         JSONObject jsonObject = JSONObject.parseObject(result);
-        String cityWeather = jsonObject.getJSONObject("data").getJSONArray("forecast15d").getJSONObject(1).toJSONString();
+        String cityWeather = jsonObject.getJSONObject("data").getJSONArray("forecast15d").getJSONObject(2).toJSONString();
         projectCityWeather.setWeatherData(cityWeather);
         projectCityWeatherDao.save(projectCityWeather);
 

+ 4 - 0
virgo.api/src/main/java/com/bosshand/virgo/api/service/WeeklyService.java

@@ -46,6 +46,10 @@ public class WeeklyService {
     @Autowired
     ManagerClient managerClient;
 
+    public Weekly get(long id){
+        return weeklyDao.get(id);
+    }
+
     public List<Weekly> getByProjectId(long projectId){
        return weeklyDao.getByProjectId(projectId);
     }