| package com.mzl.flower.web.calendar; | 
|   | 
|   | 
| import com.mzl.flower.service.calendar.CalendarService; | 
| import io.swagger.annotations.Api; | 
| import io.swagger.annotations.ApiOperation; | 
| import org.springframework.beans.factory.annotation.Autowired; | 
| import org.springframework.web.bind.annotation.GetMapping; | 
| import org.springframework.web.bind.annotation.PathVariable; | 
| import org.springframework.web.bind.annotation.RequestMapping; | 
| import org.springframework.web.bind.annotation.RestController; | 
|   | 
| /** | 
| * @author @TaoJie | 
| * @since 2024-09-12 | 
| */ | 
| @RestController | 
| @RequestMapping("/v2/calendar") | 
| @Api(value = "日历", tags = "日历") | 
| public class CalendarController { | 
|   | 
|     @Autowired | 
|     CalendarService calendarService; | 
|   | 
|     @ApiOperation(value = "日历生成", notes = "日历生成") | 
|     @GetMapping("/generate/fromTo/{startYear}/{endYear}") | 
|     public void generateFromTo(@PathVariable Integer startYear, @PathVariable Integer endYear) { | 
|         for(int i=startYear;i<=endYear;i++){ | 
|             calendarService.generateCalendar(i); | 
|         } | 
|   | 
|     } | 
|   | 
|   | 
| } |