package com.yida.data.system.controller;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.system.service.EduHolidayService;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;

@Api(tags = "节假日")
@AllArgsConstructor
@RestController
@RequestMapping("/holiday")
public class EduHolidayController {
    private final EduHolidayService eduHolidayService;

    @ApiOperation("初始化节假日")
    @GetMapping("/initHoliday")
    public ResultBean initHoliday(@ApiParam("年份") Integer year) {
        eduHolidayService.initHoliday(year);
        return ResultBean.buildSuccess();
    }
}
