| | |
| | | import com.ruoyi.technology.bean.dto.TechnologyParamDto; |
| | | import com.ruoyi.technology.bean.vo.TechnologyParamVo; |
| | | import com.ruoyi.technology.service.TechnologyParamService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("/technologyParam") |
| | | @RequiredArgsConstructor |
| | | @Api(tags = "基础参数") |
| | | @Tag(name = "基础参数") |
| | | public class TechnologyParamController { |
| | | |
| | | private final TechnologyParamService technologyParamService; |
| | | |
| | | @GetMapping("list") |
| | | @Log(title = "基础参数数据集合", businessType = BusinessType.OTHER) |
| | | @ApiOperation("基础参数分页查询") |
| | | @Operation(summary = "基础参数分页查询") |
| | | public R<IPage<TechnologyParamVo>> TechnologyParamDtoList(Page<TechnologyParamDto> page, TechnologyParamDto technologyParamDto) { |
| | | IPage<TechnologyParamVo> paramList = technologyParamService.baseParamList(page, technologyParamDto); |
| | | return R.ok(paramList); |
| | |
| | | |
| | | @PostMapping("/add") |
| | | @Log(title = "新增基础参数", businessType = BusinessType.INSERT) |
| | | @ApiOperation("新增基础参数") |
| | | @Operation(summary = "新增基础参数") |
| | | public R TechnologyParamDtoAdd(@RequestBody TechnologyParamDto TechnologyParamDto) { |
| | | return R.ok(technologyParamService.addBaseParam(TechnologyParamDto)); |
| | | } |
| | | |
| | | @PutMapping("/edit") |
| | | @Log(title = "修改基础参数", businessType = BusinessType.UPDATE) |
| | | @ApiOperation("修改基础参数") |
| | | @Operation(summary = "修改基础参数") |
| | | public R TechnologyParamDtoEdit(@RequestBody TechnologyParamDto TechnologyParamDto) { |
| | | return R.ok(technologyParamService.updateBaseParam(TechnologyParamDto)); |
| | | } |
| | | |
| | | @DeleteMapping("/remove/{ids}") |
| | | @Log(title = "删除基础参数", businessType = BusinessType.DELETE) |
| | | @ApiOperation("删除基础参数") |
| | | @Operation(summary = "删除基础参数") |
| | | public R TechnologyParamDtoRemove(@PathVariable Long[] ids) { |
| | | return R.ok(technologyParamService.deleteBaseParamByIds(ids)); |
| | | } |