feiyu02
2024-11-19 752e00503f672ddfe2066afb6c235721a3a912b5
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
package cn.flightfeather.supervision.lightshare.web
 
import cn.flightfeather.supervision.domain.entity.EnforceCase
import cn.flightfeather.supervision.lightshare.service.EnforceCaseService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.*
 
@Api(tags = ["环保督察案例API接口"])
@RestController
@RequestMapping("/enforceCase")
class EnforceCaseController(private val enforceCaseService: EnforceCaseService) {
 
    @ApiOperation(value = "新增案例")
    @PutMapping("/add")
    fun add(
        @ApiParam(value = "用户id") @RequestParam userId: String,
        @ApiParam(value = "咨询问题") @RequestBody case: EnforceCase,
    ) = enforceCaseService.addCase(userId, case)
 
    @ApiOperation(value = "更新案例")
    @PostMapping("/update")
    fun update(
        @ApiParam(value = "用户id") @RequestParam userId: String,
        @ApiParam(value = "咨询问题") @RequestBody case: EnforceCase,
    ) = enforceCaseService.updateCase(userId, case)
}