道路线索应急巡查系统服务后台
feiyu02
2025-04-22 41548e262362faf603a71e066e01bd4ef46619d2
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.flightfeather.grid.web
 
import com.flightfeather.grid.domain.ds1.entity.GridInfo
import com.flightfeather.grid.domain.ds1.entity.GridScheme
import com.flightfeather.grid.service.GridInfoService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.*
 
@Api(tags = ["GridInfoController"], description = "网格信息API接口")
@RestController
@RequestMapping("/grid/info")
class GridInfoController(val gridInfoService: GridInfoService) {
 
    @ApiOperation("新建网格")
    @PostMapping("/create")
    fun createGrid(
        @ApiParam("网格信息") @RequestBody gridInfo: GridInfo,
    ) = gridInfoService.createGrid(gridInfo)
 
    @ApiOperation("获取所有网格规划方案")
    @GetMapping("/fetch")
    fun getGridList(
        @ApiParam("网格规划方案id") @RequestParam id: String,
    ) = gridInfoService.getGridList(id)
 
    @ApiOperation("更新网格")
    @PostMapping("/update")
    fun updateGrid(
        @ApiParam("网格信息") @RequestBody gridInfo: GridInfo,
    ) = gridInfoService.updateGrid(gridInfo)
 
    @ApiOperation("删除网格")
    @DeleteMapping("/delete")
    fun deleteGrid(
        @ApiParam("网格id") @RequestParam id: String,
    ) = gridInfoService.deleteGrid(id)
}