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); } /**