cloudroam
2024-11-04 e2a3161003417cd37aaa98fe062b26048d4be093
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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);
        }
 
    }
 
 
}