From ce93b6e846a9688db550ed40e6718c0e58d524ec Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期一, 17 二月 2025 11:18:36 +0800 Subject: [PATCH] 设备权限 --- lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/ProductInfoController.java | 27 +++++++++++++++++++++++---- 1 files changed, 23 insertions(+), 4 deletions(-) diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/ProductInfoController.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/ProductInfoController.java index beec47a..e2292a0 100644 --- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/ProductInfoController.java +++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/ProductInfoController.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.shiro.SecurityUtils; +import org.jeecg.common.api.vo.Result; import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.vo.LoginUser; @@ -17,6 +18,7 @@ import org.jeecg.modules.dnc.ucenter.Department; import org.jeecg.modules.dnc.ucenter.UserDepartExt; import org.jeecg.modules.dnc.utils.ValidateUtil; +import org.jeecg.modules.system.entity.MdcProduction; import org.jeecg.modules.system.entity.SysUser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -142,8 +144,8 @@ @AutoLog(value = "浜у搧琛�-鑾峰彇宸插垎閰嶇殑閮ㄩ棬") @ApiOperation(value = "浜у搧琛�-鑾峰彇宸插垎閰嶇殑閮ㄩ棬", notes = "浜у搧琛�-鑾峰彇宸插垎閰嶇殑閮ㄩ棬") @GetMapping("/get/perm/depart/{nodeType}/{paramId}") - public QueryListResponseResult<Department> getDepartPermsList(@PathVariable("nodeType") Integer nodeType, @PathVariable("paramId") String paramId) { - List<Department> list = productInfoService.getDepartPermsList(nodeType, paramId); + public QueryListResponseResult<MdcProduction> getDepartPermsList(@PathVariable("nodeType") Integer nodeType, @PathVariable("paramId") String paramId) { + List<MdcProduction> list = productInfoService.getDepartPermsList(nodeType, paramId); if(list == null) list = Collections.emptyList(); return new QueryListResponseResult(CommonCode.SUCCESS, list); @@ -152,8 +154,8 @@ @AutoLog(value = "浜у搧琛�-鑾峰彇鏈垎閰嶇殑閮ㄩ棬") @ApiOperation(value = "浜у搧琛�-鑾峰彇鏈垎閰嶇殑閮ㄩ棬", notes = "浜у搧琛�-鑾峰彇鏈垎閰嶇殑閮ㄩ棬") @GetMapping("/get/non/perm/depart/{nodeType}/{paramId}") - public QueryListResponseResult<Department> getDepartNonPermsList(@PathVariable("nodeType") Integer nodeType, @PathVariable("paramId") String paramId) { - List<Department> list = productInfoService.getDepartNonPermsList(nodeType, paramId); + public QueryListResponseResult<MdcProduction> getDepartNonPermsList(@PathVariable("nodeType") Integer nodeType, @PathVariable("paramId") String paramId) { + List<MdcProduction> list = productInfoService.getDepartNonPermsList(nodeType, paramId); if(list == null) list = Collections.emptyList(); return new QueryListResponseResult(CommonCode.SUCCESS, list); @@ -253,4 +255,21 @@ list = Collections.emptyList(); return new QueryListResponseResult<>(CommonCode.SUCCESS, list); } + + /** + * 浜у搧缁撴瀯鏍�-閫氳繃绫诲瀷灏辫鍒犻櫎 + * @param id + * @param type + * @return + */ + @AutoLog(value = "浜у搧缁撴瀯鏍�-閫氳繃绫诲瀷灏辫鍒犻櫎") + @ApiOperation(value = "浜у搧缁撴瀯鏍�-閫氳繃绫诲瀷灏辫鍒犻櫎", notes = "浜у搧缁撴瀯鏍�-閫氳繃绫诲瀷灏辫鍒犻櫎") + @DeleteMapping("/delete/{id}/{type}") + public Result<?> deleteProductTreeByType(@PathVariable("id") String id, @PathVariable("type") Integer type) { + boolean b =productInfoService.deleteProductTree(id, type); + if (b){ + return Result.ok("鍒犻櫎鎴愬姛锛�"); + } + return Result.error("鍒犻櫎澶辫触锛�"); + } } -- Gitblit v1.9.3