仪器CMS接口

master
Gitea 2 weeks ago
parent 3879aa062f
commit 8b8ad43dc4
  1. 2
      jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
  2. 41
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/instrument/controller/InstrumentController.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专家模块不拦截

@ -94,6 +94,47 @@ public class InstrumentController extends JeecgController<Instrument, IInstrumen
return Result.OK(pageList);
}
/**
* 分页列表查询
*
* @param instrument
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "仪器信息表-分页列表查询")
@ApiOperation(value="仪器信息表-分页列表查询", notes="仪器信息表-分页列表查询")
@GetMapping(value = "/listcms")
public Result<IPage<Instrument>> listcms(Instrument instrument,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Instrument> queryWrapper = QueryGenerator.initQueryWrapper(instrument, req.getParameterMap());
queryWrapper.eq("state","3");
Page<Instrument> page = new Page<Instrument>(pageNo, pageSize);
IPage<Instrument> 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<Instrument> queryByIdCms(@RequestParam(name="id",required=true) String id) {
Instrument instrument = instrumentService.getById(id);
if(instrument==null) {
return Result.error("未找到对应数据");
}
return Result.OK(instrument);
}
/**
* 分页列表查询
*

Loading…
Cancel
Save