在需要对QueryPage增加额外的查询条件,比如DemoItem增加只展示创建人为当前用户的数据
@Function.Advanced(type = FunctionTypeEnum.QUERY, displayName = "查询列表")
@Function.fun(FunctionConstants.queryPage)
@Function(openLevel = {FunctionOpenEnum.LOCAL, FunctionOpenEnum.REMOTE, FunctionOpenEnum.API})
public Pagination<DemoItem> queryPage(Pagination<DemoItem> page, IWrapper<DemoItem> queryWrapper) {
LambdaQueryWrapper<DemoItem> qw = ((QueryWrapper<DemoItem>) queryWrapper).lambda();
qw.eq(DemoItem::getCreateUid, PamirsSession.getUserId());
return demoItemService.queryPage(page, qw);
}
Oinone社区 作者:oinone原创文章,如若转载,请注明出处:https://doc.oinone.top/backend/7.html
访问Oinone官网:https://www.oinone.top获取数式Oinone低代码应用平台体验