From fb6ea0bfd282341dd5b2afcace7d53a907543e8d Mon Sep 17 00:00:00 2001 From: zzhuan <1260310633@qq.com> Date: Wed, 14 Jan 2026 14:42:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E8=8E=B7=E5=8F=96=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../codegen/controller/FunOperationController.java | 9 ++++++++- .../xinghe/codegen/service/FunOperationService.java | 2 +- .../codegen/service/impl/FunOperationServiceImpl.java | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/cczsa/xinghe/codegen/controller/FunOperationController.java b/src/main/java/com/cczsa/xinghe/codegen/controller/FunOperationController.java index 0690dbe..f008d7a 100644 --- a/src/main/java/com/cczsa/xinghe/codegen/controller/FunOperationController.java +++ b/src/main/java/com/cczsa/xinghe/codegen/controller/FunOperationController.java @@ -10,6 +10,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import lombok.RequiredArgsConstructor; @@ -35,7 +36,13 @@ public class FunOperationController { @Operation(summary = "获取操作列表", description = "获取操作列表") @PostMapping("/query") public XResult> query(@RequestBody @Valid FunOperationQueryReq req) { - return funoperationService.query(req); + return funoperationService.query(req, null); + } + + @Operation(summary = "菜单获取操作列表", description = "菜单获取操作列表") + @PostMapping("/query/{isTenant}") + public XResult> queryFunOperation(@RequestBody @Valid FunOperationQueryReq req, @PathVariable("isTenant") Boolean isTenant) { + return funoperationService.query(req, isTenant); } @Operation(summary = "创建/修改操作", description = "创建/修改操作") diff --git a/src/main/java/com/cczsa/xinghe/codegen/service/FunOperationService.java b/src/main/java/com/cczsa/xinghe/codegen/service/FunOperationService.java index 2649159..d2077ac 100644 --- a/src/main/java/com/cczsa/xinghe/codegen/service/FunOperationService.java +++ b/src/main/java/com/cczsa/xinghe/codegen/service/FunOperationService.java @@ -19,7 +19,7 @@ public interface FunOperationService { /** * 获取操作列表 */ - XResult> query(FunOperationQueryReq req); + XResult> query(FunOperationQueryReq req, Boolean isTenant); /** * 创建/修改操作 diff --git a/src/main/java/com/cczsa/xinghe/codegen/service/impl/FunOperationServiceImpl.java b/src/main/java/com/cczsa/xinghe/codegen/service/impl/FunOperationServiceImpl.java index c3cf968..ac78e7f 100644 --- a/src/main/java/com/cczsa/xinghe/codegen/service/impl/FunOperationServiceImpl.java +++ b/src/main/java/com/cczsa/xinghe/codegen/service/impl/FunOperationServiceImpl.java @@ -44,7 +44,7 @@ public class FunOperationServiceImpl implements FunOperationService { * 获取操作列表 */ @Override - public XResult> query(FunOperationQueryReq req) { + public XResult> query(FunOperationQueryReq req, Boolean isTenant) { FunOperationDef funOperationDef = FunOperationDef.FUN_OPERATION_ENTITY; FunModuleDef funModuleDef = FunModuleDef.FUN_MODULE_ENTITY; FunItemDef funItemDef = FunItemDef.FUN_ITEM_ENTITY; @@ -57,6 +57,7 @@ public class FunOperationServiceImpl implements FunOperationService { .eq(FunOperationEntity::getItemId, req.getItemId(), req.getItemId() != null) .like(FunOperationEntity::getOperationCode, req.getOperationCode(), StrUtil.isNotBlank(req.getOperationCode())) .like(FunOperationEntity::getFunName, req.getFunName(), StrUtil.isNotBlank(req.getFunName())) + .eq(FunItemEntity::getIsTenant, isTenant, isTenant != null) .orderBy(FunOperationEntity::getSortOrder, false); List funOperationQueryRes = funOperationMapper.selectListByQueryAs(queryWrapper, FunOperationQueryRes.class); return XResult.ok(funOperationQueryRes);