输入日期查询当天的日历含农历、节日等信息
效果图:
@RestController
@RequestMapping("opApi")
@Api(tags="日历查询")
public class WarnController {
@GetMapping("/getDate")
@ApiOperation("获取日历")
public JSONObject getWeather(@RequestParam String date){
String url = "http://www.autmone.com/openapi/icalendar/queryDate"
.concat("?date=").concat(date);
String result = HttpUtils.doGet(url, 2000);
JSONObject dataJson = JSONObject.parseObject(result);
int code = dataJson.getInteger("code");
if (code == 0) {
return dataJson.getJSONObject("data");
}
return null;
}
}