From badca50df3e909ab8e0432c16595964e26120e67 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Thu, 29 Jan 2026 14:22:31 +0800
Subject: [PATCH] 共享设备表

---
 drone-service/drone-fw/src/main/java/org/sxkj/fw/fwDevicePerShare/controller/FwDevicePerShareController.java |   46 +++++++++++++++++++++++++---------------------
 1 files changed, 25 insertions(+), 21 deletions(-)

diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/fwDevicePerShare/controller/FwDevicePerShareController.java b/drone-service/drone-fw/src/main/java/org/sxkj/fw/fwDevicePerShare/controller/FwDevicePerShareController.java
index 38ee6ac..f593ec3 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/fwDevicePerShare/controller/FwDevicePerShareController.java
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/fwDevicePerShare/controller/FwDevicePerShareController.java
@@ -27,10 +27,12 @@
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.core.tool.utils.Func;
 import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.sxkj.fw.fwDevicePerShare.dto.FwDevicePerShareDTO;
 import org.sxkj.fw.fwDevicePerShare.entity.FwDevicePerShareEntity;
 import org.sxkj.fw.fwDevicePerShare.vo.FwDevicePerShareVO;
 import org.sxkj.fw.fwDevicePerShare.excel.FwDevicePerShareExcel;
@@ -43,6 +45,7 @@
 import springfox.documentation.annotations.ApiIgnore;
 import java.util.Map;
 import java.util.List;
+import java.util.Objects;
 import javax.servlet.http.HttpServletResponse;
 
 /**
@@ -72,13 +75,13 @@
 	/**
 	 * 设备权限分享表 分页
 	 */
-	@GetMapping("/list")
-	@ApiOperationSupport(order = 2)
-	@ApiOperation(value = "分页", notes = "传入fwDevicePerShare")
-	public R<IPage<FwDevicePerShareVO>> list(@ApiIgnore @RequestParam Map<String, Object> fwDevicePerShare, Query query) {
-		IPage<FwDevicePerShareEntity> pages = fwDevicePerShareService.page(Condition.getPage(query), Condition.getQueryWrapper(fwDevicePerShare, FwDevicePerShareEntity.class));
-		return R.data(FwDevicePerShareWrapper.build().pageVO(pages));
-	}
+	// @GetMapping("/list")
+	// @ApiOperationSupport(order = 2)
+	// @ApiOperation(value = "分页", notes = "传入fwDevicePerShare")
+	// public R<IPage<FwDevicePerShareVO>> list(@ApiIgnore @RequestParam Map<String, Object> fwDevicePerShare, Query query) {
+	// 	IPage<FwDevicePerShareEntity> pages = fwDevicePerShareService.page(Condition.getPage(query), Condition.getQueryWrapper(fwDevicePerShare, FwDevicePerShareEntity.class));
+	// 	return R.data(FwDevicePerShareWrapper.build().pageVO(pages));
+	// }
 
 	/**
 	 * 设备权限分享表 自定义分页
@@ -97,29 +100,30 @@
 	@PostMapping("/save")
 	@ApiOperationSupport(order = 4)
 	@ApiOperation(value = "新增", notes = "传入fwDevicePerShare")
-	public R save(@Valid @RequestBody FwDevicePerShareEntity fwDevicePerShare) {
-		return R.status(fwDevicePerShareService.save(fwDevicePerShare));
+	public R save(@Valid @RequestBody FwDevicePerShareDTO fwDevicePerShare) {
+		FwDevicePerShareEntity fwDevicePerShareEntity = Objects.requireNonNull(BeanUtil.copy(fwDevicePerShare, FwDevicePerShareEntity.class));
+		return R.status(fwDevicePerShareService.save(fwDevicePerShareEntity));
 	}
 
 	/**
 	 * 设备权限分享表 修改
 	 */
-	@PostMapping("/update")
-	@ApiOperationSupport(order = 5)
-	@ApiOperation(value = "修改", notes = "传入fwDevicePerShare")
-	public R update(@Valid @RequestBody FwDevicePerShareEntity fwDevicePerShare) {
-		return R.status(fwDevicePerShareService.updateById(fwDevicePerShare));
-	}
+	// @PostMapping("/update")
+	// @ApiOperationSupport(order = 5)
+	// @ApiOperation(value = "修改", notes = "传入fwDevicePerShare")
+	// public R update(@Valid @RequestBody FwDevicePerShareEntity fwDevicePerShare) {
+	// 	return R.status(fwDevicePerShareService.updateById(fwDevicePerShare));
+	// }
 
 	/**
 	 * 设备权限分享表 新增或修改
 	 */
-	@PostMapping("/submit")
-	@ApiOperationSupport(order = 6)
-	@ApiOperation(value = "新增或修改", notes = "传入fwDevicePerShare")
-	public R submit(@Valid @RequestBody FwDevicePerShareEntity fwDevicePerShare) {
-		return R.status(fwDevicePerShareService.saveOrUpdate(fwDevicePerShare));
-	}
+	// @PostMapping("/submit")
+	// @ApiOperationSupport(order = 6)
+	// @ApiOperation(value = "新增或修改", notes = "传入fwDevicePerShare")
+	// public R submit(@Valid @RequestBody FwDevicePerShareEntity fwDevicePerShare) {
+	// 	return R.status(fwDevicePerShareService.saveOrUpdate(fwDevicePerShare));
+	// }
 
 	/**
 	 * 设备权限分享表 删除

--
Gitblit v1.9.3