From 8b8ad43dc4dfebe914a60975d6907d67a6db111f Mon Sep 17 00:00:00 2001 From: Gitea Date: Wed, 6 Nov 2024 15:18:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=AA=E5=99=A8CMS=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jeecg/config/shiro/ShiroConfig.java | 2 + .../controller/InstrumentController.java | 41 +++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java index ba519c7..0b61b4b 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java @@ -84,6 +84,8 @@ public class ShiroConfig { } // 配置不会被拦截的链接 顺序判断 + filterChainDefinitionMap.put("/instrument/instrument/listcms", "anon"); //cms仪器资源接口 + filterChainDefinitionMap.put("/instrument/instrument/queryByIdCms", "anon"); //cms仪器资源接口 filterChainDefinitionMap.put("/expert/expert/listadminCMS", "anon"); //cms专家模块不拦截 filterChainDefinitionMap.put("/expert/expert/directioncalListCMS", "anon"); //cms专家模块不拦截 filterChainDefinitionMap.put("/expert/expert/CMSexpinfo", "anon"); //cms专家模块不拦截 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 ee2c50d..51eafb8 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 @@ -94,6 +94,47 @@ public class InstrumentController extends JeecgController> listcms(Instrument instrument, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(instrument, req.getParameterMap()); + queryWrapper.eq("state","3"); + Page page = new Page(pageNo, pageSize); + IPage pageList = instrumentService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "仪器信息表-通过id查询") + @ApiOperation(value="仪器信息表-通过id查询", notes="仪器信息表-通过id查询") + @GetMapping(value = "/queryByIdCms") + public Result queryByIdCms(@RequestParam(name="id",required=true) String id) { + Instrument instrument = instrumentService.getById(id); + if(instrument==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(instrument); + } + /** * 分页列表查询 *