package com.ruoyi.technology.controller;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
import com.ruoyi.framework.web.domain.R;
|
import com.ruoyi.technology.bean.dto.TechnologyParamDto;
|
import com.ruoyi.technology.bean.vo.TechnologyParamVo;
|
import com.ruoyi.technology.service.TechnologyParamService;
|
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
|
@Tag(name = "基础参数")
|
public class TechnologyParamController {
|
|
private final TechnologyParamService technologyParamService;
|
|
@GetMapping("list")
|
@Log(title = "基础参数数据集合", businessType = BusinessType.OTHER)
|
@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)
|
@Operation(summary = "新增基础参数")
|
public R TechnologyParamDtoAdd(@RequestBody TechnologyParamDto TechnologyParamDto) {
|
return R.ok(technologyParamService.addBaseParam(TechnologyParamDto));
|
}
|
|
@PutMapping("/edit")
|
@Log(title = "修改基础参数", businessType = BusinessType.UPDATE)
|
@Operation(summary = "修改基础参数")
|
public R TechnologyParamDtoEdit(@RequestBody TechnologyParamDto TechnologyParamDto) {
|
return R.ok(technologyParamService.updateBaseParam(TechnologyParamDto));
|
}
|
|
@DeleteMapping("/remove/{ids}")
|
@Log(title = "删除基础参数", businessType = BusinessType.DELETE)
|
@Operation(summary = "删除基础参数")
|
public R TechnologyParamDtoRemove(@PathVariable Long[] ids) {
|
return R.ok(technologyParamService.deleteBaseParamByIds(ids));
|
}
|
}
|