示例接口定义 为了方便笔者先自己写了个简单的接口用于展示,返回当前时间,具体如下 /// /// GetToday. /// /// [HttpGet] [Route("GetTime/Today")] public MyDateTime GetToday() { var now = DateTime.Now; return new MyDateTime { Year = now.Year, Month = now.Month, Day = now.Day, Hour = now.Hour