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); + } + /** * 分页列表查询 *