其他分享
首页 > 其他分享> > Wrapper 写法

Wrapper 写法

作者:互联网

Wrapper<WxAutoReply> queryWrapper = Wrappers.<WxAutoReply>lambdaQuery()
.eq(WxAutoReply::getReqKey, wxAutoReply.getReqKey())
.eq(WxAutoReply::getRepType, wxAutoReply.getRepMate());


//查询写法
List<SysUser> userList = sysUserService
.list(Wrappers.<SysUser>query().lambda().eq(SysUser::getMiniOpenid, identify));
deptAllList = deptMapper.selectList(Wrappers.emptyWrapper());
sysJobService.page(page, Wrappers.query(sysJob))
this.sysJobService
.count(Wrappers.query(SysJob.builder().jobName(jobName).jobGroup(jobGroup).build())) > 0 ? R.failed()
: R.ok();

//修改写法
sysUserService.update(condition, Wrappers.<SysUser>lambdaUpdate().set(SysUser::getMiniOpenid, null));

// 查询数据权限内部门
List<Integer> deptOwnIdList = deptMapper.selectListByScope(Wrappers.emptyWrapper(), new DataScope()).stream()
.map(SysDept::getDeptId).collect(Collectors.toList());


标签:Wrappers,写法,sysJobService,Wrapper,query,eq
来源: https://www.cnblogs.com/wjsqqj/p/16415113.html