Преглед изворни кода

手机端获取天气信息增加默认日期

Wang-Xiao-Ran пре 1 година
родитељ
комит
953b1da18e

+ 3 - 0
src/main/java/com/sooka/sponest/mobile/data/generalbusiness/AppDigitalForestController.java

@@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 
 @RequestMapping("AppDigitalForestController")
 @RestController
@@ -27,6 +29,7 @@ public class AppDigitalForestController {
     @ApiOperation(value = "查询天气信息", notes = "查询天气信息")
     @GetMapping("mainPage")
     public AjaxResult mainPage(AppDigitalForestWeather appDigitalForestWeather) {
+        appDigitalForestWeather.setWeatherinformationTime(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
         return remoteDataBaseService.selectWeather(appDigitalForestWeather);
     }