package com.ruoyi.web.controller.manage; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.manage.domain.DpShipType; import com.ruoyi.manage.service.DpShipTypeService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; /** *
* 舰船类型表 前端控制器 *
* * @author sunjiawei * @since 2025-03-18 */ @RestController @RequestMapping("/dp/dpShipType") @Tag(name = "大屏--舰船类型管理") public class DpShipTypeController { @Autowired private DpShipTypeService dpShipTypeService; @GetMapping("/list") @Operation(summary = "获取舰船类型列表") public AjaxResult getList(){ return AjaxResult.success(dpShipTypeService.list()); } @GetMapping("/pageList") @Operation(summary = "舰船类型分页列表") public TableDataInfo getPageList(DpShipType dpShipType) { return dpShipTypeService.getPageList(dpShipType); } @GetMapping(value = "/{id}") @Operation(summary = "获取舰船类型详细信息") public AjaxResult getInfo(@PathVariable("id") Integer id) { return AjaxResult.success(dpShipTypeService.getById(id)); } @Operation(summary = "新增") @PostMapping public AjaxResult add(@RequestBody DpShipType dpShipType) { return AjaxResult.success(dpShipTypeService.save(dpShipType)); } @Operation(summary = "修改") @PutMapping public AjaxResult edit(@RequestBody DpShipType dpShipType) { return AjaxResult.success(dpShipTypeService.updateById(dpShipType)); } @Operation(summary = "删除") @DeleteMapping("/{id}") public AjaxResult remove(@PathVariable Integer id) { return AjaxResult.success(dpShipTypeService.removeById(id)); } }