feiyu02
2024-08-15 196bb14112448857a885e32dc4149e308e00b01a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package cn.flightfeather.supervision.lightshare.web
 
import cn.flightfeather.supervision.lightshare.service.ProblemService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.RestController
 
@Api(tags = ["巡查问题API接口"])
@RestController
@RequestMapping("/problem")
class ProblemController(val problemService: ProblemService) {
 
    @ApiOperation(value = "根据年月获取用户的问题")
    @GetMapping("/list")
    fun getProblemsByPeriod(
        @ApiParam("用户id") @RequestParam("userId") userId: String,
        @ApiParam("年份") @RequestParam("year") year: Int,
        @ApiParam("月份") @RequestParam("month") month: Int
    ) = problemService.getProblemsByPeriod(userId, year, month)
}