| 对比新文件 |
| | |
| | | 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.TechnologyOperationDto; |
| | | import com.ruoyi.technology.bean.vo.TechnologyOperationVo; |
| | | import com.ruoyi.technology.service.TechnologyOperationService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Tag(name = "宸ュ簭绠$悊") |
| | | @RequestMapping("/technologyOperation") |
| | | @RequiredArgsConstructor |
| | | public class TechnologyOperationController { |
| | | |
| | | private final TechnologyOperationService technologyOperationService; |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "Technology operation page", businessType = BusinessType.OTHER) |
| | | @Operation(summary = "宸ュ簭鍒嗛〉鏌ヨ") |
| | | public R<IPage<TechnologyOperationVo>> listPage(Page<TechnologyOperationDto> page, TechnologyOperationDto technologyOperationDto) { |
| | | return R.ok(technologyOperationService.listPage(page, technologyOperationDto)); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @Log(title = "Add technology operation", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "鏂板宸ュ簭") |
| | | public R add(@RequestBody TechnologyOperationDto technologyOperationDto) { |
| | | return technologyOperationService.add(technologyOperationDto); |
| | | } |
| | | |
| | | @PutMapping("/update") |
| | | @Log(title = "Update technology operation", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "淇敼宸ュ簭") |
| | | public R update(@RequestBody com.ruoyi.technology.pojo.TechnologyOperation technologyOperation) { |
| | | return R.ok(technologyOperationService.updateById(technologyOperation)); |
| | | } |
| | | |
| | | @DeleteMapping("/batchDelete") |
| | | @Log(title = "Delete technology operation", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "鎵归噺鍒犻櫎宸ュ簭") |
| | | public R batchDelete(@RequestBody List<Long> ids) { |
| | | return R.ok(technologyOperationService.batchDelete(ids)); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @Operation(summary = "鏌ヨ鍏ㄩ儴宸ュ簭") |
| | | public R<List<TechnologyOperationVo>> list() { |
| | | return R.ok(technologyOperationService.listVo()); |
| | | } |
| | | } |