【更新】修复查询使用lamdaUpdateWrapper的错误

pull/84/head
xuyuxiang 2023-01-31 09:10:54 +08:00
parent 61b969b2f1
commit b61371b722
6 changed files with 8 additions and 8 deletions

View File

@ -90,7 +90,7 @@ public class DevMessageServiceImpl extends ServiceImpl<DevMessageMapper, DevMess
queryWrapper.lambda().like(DevMessage::getSubject, devMessagePageParam.getSearchKey());
}
if(ObjectUtil.isNotEmpty(devMessagePageParam.getReceiveUserId())) {
queryWrapper.lambda().in(DevMessage::getId, devRelationService.list(new LambdaUpdateWrapper<DevRelation>()
queryWrapper.lambda().in(DevMessage::getId, devRelationService.list(new LambdaQueryWrapper<DevRelation>()
.eq(DevRelation::getCategory, DevRelationCategoryEnum.MSG_TO_USER.getValue())
.eq(DevRelation::getTargetId, devMessagePageParam.getReceiveUserId())).stream()
.map(DevRelation::getObjectId).collect(Collectors.toList()));

View File

@ -130,7 +130,7 @@ public class MobileMenuController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
@ApiOperationSupport(order = 8)
@ApiOperationSupport(order = 6)
@ApiOperation("获取模块选择器")
@GetMapping("/mobile/menu/moduleSelector")
public CommonResult<List<MobileModule>> moduleSelector(MobileMenuSelectorModuleParam mobileMenuSelectorModuleParam) {
@ -143,7 +143,7 @@ public class MobileMenuController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
@ApiOperationSupport(order = 9)
@ApiOperationSupport(order = 7)
@ApiOperation("获取菜单树选择器")
@GetMapping("/mobile/menu/menuTreeSelector")
public CommonResult<List<Tree<String>>> menuTreeSelector(MobileMenuSelectorMenuParam mobileMenuSelectorMenuParam) {

View File

@ -72,7 +72,7 @@ public class SysIndexServiceImpl implements SysIndexService {
@Override
public List<SysIndexScheduleListResult> scheduleList(SysIndexScheduleListParam sysIndexScheduleListParam) {
return sysRelationService.list(new LambdaUpdateWrapper<SysRelation>().eq(SysRelation::getObjectId, StpUtil.getLoginIdAsString())
return sysRelationService.list(new LambdaQueryWrapper<SysRelation>().eq(SysRelation::getObjectId, StpUtil.getLoginIdAsString())
.eq(SysRelation::getTargetId, sysIndexScheduleListParam.getScheduleDate())
.eq(SysRelation::getCategory, SysRelationCategoryEnum.SYS_USER_SCHEDULE_DATA.getValue()))
.stream().map(sysRelation -> {

View File

@ -130,11 +130,11 @@ public class SysButtonServiceImpl extends ServiceImpl<SysButtonMapper, SysButton
List<String> buttonIdList = CollStreamUtil.toList(sysButtonIdParamList, SysButtonIdParam::getId);
if(ObjectUtil.isNotEmpty(buttonIdList)) {
// 获取按钮的父菜单id集合
List<String> parentMenuIdList = sysMenuService.list(new LambdaUpdateWrapper<SysMenu>().in(SysMenu::getId, buttonIdList)
List<String> parentMenuIdList = sysMenuService.list(new LambdaQueryWrapper<SysMenu>().in(SysMenu::getId, buttonIdList)
.eq(SysMenu::getCategory, SysResourceCategoryEnum.BUTTON.getValue())).stream().map(SysMenu::getParentId)
.collect(Collectors.toList());
if(ObjectUtil.isNotEmpty(parentMenuIdList)) {
sysRelationService.list(new LambdaUpdateWrapper<SysRelation>().in(SysRelation::getTargetId, parentMenuIdList)
sysRelationService.list(new LambdaQueryWrapper<SysRelation>().in(SysRelation::getTargetId, parentMenuIdList)
.eq(SysRelation::getCategory, SysRelationCategoryEnum.SYS_ROLE_HAS_RESOURCE.getValue())
.isNotNull(SysRelation::getExtJson)).forEach(sysRelation -> {
JSONObject extJsonObject = JSONUtil.parseObj(sysRelation.getExtJson());

View File

@ -254,7 +254,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
List<String> sysMenuIdList = CollStreamUtil.toList(sysMenuIdParamList, SysMenuIdParam::getId);
if(ObjectUtil.isNotEmpty(sysMenuIdList)) {
// 获取菜单下的菜单、按钮
List<SysMenu> allMenuList = this.list(new LambdaUpdateWrapper<SysMenu>()
List<SysMenu> allMenuList = this.list(new LambdaQueryWrapper<SysMenu>()
.in(SysMenu::getCategory, CollectionUtil.newArrayList(SysResourceCategoryEnum.MENU.getValue(),
SysResourceCategoryEnum.BUTTON.getValue())));
List<String> toDeleteMenuIdList = CollectionUtil.newArrayList();

View File

@ -115,7 +115,7 @@ public class SysModuleServiceImpl extends ServiceImpl<SysModuleMapper, SysModule
}
// 获取模块下的菜单、按钮
List<SysMenu> allMenuList = sysMenuService.list(new LambdaUpdateWrapper<SysMenu>()
List<SysMenu> allMenuList = sysMenuService.list(new LambdaQueryWrapper<SysMenu>()
.in(SysMenu::getCategory, CollectionUtil.newArrayList(SysResourceCategoryEnum.MENU.getValue(),
SysResourceCategoryEnum.BUTTON.getValue())));
if(ObjectUtil.isNotEmpty(allMenuList)) {