From e8e73529983bf656d8aa6627215045f56cc27103 Mon Sep 17 00:00:00 2001
From: zhuo <2089219845@qq.com>
Date: 星期一, 24 二月 2025 11:01:00 +0800
Subject: [PATCH] Merge branch 'dev' into dev_ly
---
cnas-device/src/main/java/com/ruoyi/device/controller/DeviceScrappedController.java | 82 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 82 insertions(+), 0 deletions(-)
diff --git a/cnas-device/src/main/java/com/ruoyi/device/controller/DeviceScrappedController.java b/cnas-device/src/main/java/com/ruoyi/device/controller/DeviceScrappedController.java
new file mode 100644
index 0000000..95794eb
--- /dev/null
+++ b/cnas-device/src/main/java/com/ruoyi/device/controller/DeviceScrappedController.java
@@ -0,0 +1,82 @@
+package com.ruoyi.device.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.common.core.domain.Result;
+import com.ruoyi.device.pojo.DeviceScrapped;
+import com.ruoyi.device.service.DeviceScrappedService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.Map;
+
+/**
+ * <p>
+ * 璁惧鎶ュ簾鐢宠琛� 鍓嶇鎺у埗鍣�
+ * </p>
+ *
+ * @author 姹熻嫃榈烽洀缃戠粶绉戞妧鏈夐檺鍏徃
+ * @since 2024-12-17 01:53:47
+ */
+@Api(tags = "璁惧鎶ュ簾鐢宠琛�")
+@AllArgsConstructor
+@RestController
+@RequestMapping("/deviceScrapped")
+public class DeviceScrappedController {
+
+ private DeviceScrappedService deviceScrappedService;
+
+
+ /**
+ * 璁惧鎶ュ簾鐢宠鍒楄〃
+ * @return
+ */
+ @ApiOperation(value = "璁惧鎶ュ簾鐢宠鍒楄〃")
+ @GetMapping("/pageDeviceScrapped")
+ public Result<IPage<DeviceScrapped>> pageDeviceScrapped(Page page, DeviceScrapped deviceScrapped) {
+ return Result.success(deviceScrappedService.pageDeviceScrapped(page, deviceScrapped));
+ }
+
+ /**
+ * 鏌ヨ璁惧鎶ュ簾鐢宠
+ * @return
+ */
+ @ApiOperation(value = "鏌ヨ璁惧鎶ュ簾鐢宠")
+ @GetMapping("/getDeviceScrapped")
+ public Result getDeviceScrapped(Integer scrappedId){
+ return Result.success(deviceScrappedService.getById(scrappedId));
+ }
+
+ /**
+ * 鍒犻櫎璁惧鏍告煡璁″垝璇︽儏
+ * @return
+ */
+ @ApiOperation(value = "鍒犻櫎璁惧鎶ュ簾鐢宠")
+ @DeleteMapping("/delDeviceScrapped")
+ public Result delDeviceScrapped(Integer scrappedId){
+ return Result.success(deviceScrappedService.removeById(scrappedId));
+ }
+
+ /**
+ * 鏂板璁惧鎶ュ簾鐢宠
+ * @return
+ */
+ @ApiOperation(value = "鏂板璁惧鎶ュ簾鐢宠")
+ @PostMapping("/addDeviceScrapped")
+ public Result addDeviceScrapped(@RequestBody DeviceScrapped deviceScrapped){
+ return Result.success(deviceScrappedService.addDeviceScrapped(deviceScrapped));
+ }
+
+ /**
+ * 瀵煎嚭璁惧鎶ュ簾鐢宠
+ */
+ @ApiOperation("瀵煎嚭璁惧鎶ュ簾鐢宠")
+ @GetMapping("/exportDeviceScrapped")
+ public Result exportDeviceScrapped(Integer scrappedId, HttpServletResponse response) {
+ return deviceScrappedService.exportDeviceScrapped(scrappedId, response);
+ }
+
+}
--
Gitblit v1.9.3