fg电池监控平台的达梦数据库版本
whycxzp
2024-11-11 0f5f5e435cbc4c60ffad2bb84cfe8cc57ea32ddc
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
36
37
38
39
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.Holidays;
import com.whyc.service.HolidaysService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
@RestController
@RequestMapping("holidays")
@Api(tags = "放电计划-节假日")
public class HolidaysController {
 
    @Autowired
    private HolidaysService service;
 
    @ApiOperation("添加年度节假日")
    @PostMapping("listByYear")
    public Response addListByYear(@RequestBody List<Holidays> list){
        return service.addListByYear(list);
    }
 
    @ApiOperation("删除年度节假日")
    @PostMapping("deleteListByYear")
    public Response deleteListByYear(@RequestParam int year){
        return service.deleteListByYear(year);
    }
 
    @ApiOperation("删除指定节假日")
    @PostMapping("deleteListByIds")
    public Response deleteListByIds(@RequestBody List<Integer> ids){
        return service.deleteListByIds(ids);
    }
 
}