From 701dda3592925895898dffa893f79239d5d347d3 Mon Sep 17 00:00:00 2001 From: Gitea Date: Thu, 7 Nov 2024 15:54:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=AA=E5=99=A8cms=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../instrument/controller/InstrumentController.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/instrument/controller/InstrumentController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/instrument/controller/InstrumentController.java index b17c65c..d17a510 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/instrument/controller/InstrumentController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/instrument/controller/InstrumentController.java @@ -127,12 +127,13 @@ public class InstrumentController extends JeecgController queryByIdCms(@RequestParam(name="id",required=true) String id) { - Instrument instrument = instrumentService.getById(id); - if(instrument==null) { - return Result.error("未找到对应数据"); - } - return Result.OK(instrument); + public Result> queryByIdCms(@RequestParam(name="id",required=true) String id) { + QueryWrapper queryWrapper = new QueryWrapper(); + queryWrapper.eq("id",id); + Page page = new Page(1, 10); + IPage pageList = instrumentService.page(page, queryWrapper); + + return Result.OK(pageList); } /**