From f9818199a08948d7b15b4a06b7745ef036c72d6b Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Thu, 29 Jan 2026 14:23:03 +0800
Subject: [PATCH] 共享设备表
---
drone-service/drone-fw/src/main/java/org/sxkj/fw/fwDevicePerShare/controller/FwDevicePerShareController.java | 63 ++++++++++++-------------------
1 files changed, 25 insertions(+), 38 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..48c0a21 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));
+ // }
/**
* 设备权限分享表 删除
@@ -129,23 +133,6 @@
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(fwDevicePerShareService.deleteLogic(Func.toLongList(ids)));
- }
-
-
- /**
- * 导出数据
- */
- @GetMapping("/export-fwDevicePerShare")
- @ApiOperationSupport(order = 9)
- @ApiOperation(value = "导出数据", notes = "传入fwDevicePerShare")
- public void exportFwDevicePerShare(@ApiIgnore @RequestParam Map<String, Object> fwDevicePerShare, BladeUser bladeUser, HttpServletResponse response) {
- QueryWrapper<FwDevicePerShareEntity> queryWrapper = Condition.getQueryWrapper(fwDevicePerShare, FwDevicePerShareEntity.class);
- //if (!AuthUtil.isAdministrator()) {
- // queryWrapper.lambda().eq(FwDevicePerShare::getTenantId, bladeUser.getTenantId());
- //}
- queryWrapper.lambda().eq(FwDevicePerShareEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
- List<FwDevicePerShareExcel> list = fwDevicePerShareService.exportFwDevicePerShare(queryWrapper);
- ExcelUtil.export(response, "设备权限分享表数据" + DateUtil.time(), "设备权限分享表数据表", list, FwDevicePerShareExcel.class);
}
}
--
Gitblit v1.9.3