mirror of https://gitee.com/xiaonuobase/snowy
【更新】修复查询使用lamdaUpdateWrapper的错误
parent
61b969b2f1
commit
b61371b722
|
@ -90,7 +90,7 @@ public class DevMessageServiceImpl extends ServiceImpl<DevMessageMapper, DevMess
|
||||||
queryWrapper.lambda().like(DevMessage::getSubject, devMessagePageParam.getSearchKey());
|
queryWrapper.lambda().like(DevMessage::getSubject, devMessagePageParam.getSearchKey());
|
||||||
}
|
}
|
||||||
if(ObjectUtil.isNotEmpty(devMessagePageParam.getReceiveUserId())) {
|
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::getCategory, DevRelationCategoryEnum.MSG_TO_USER.getValue())
|
||||||
.eq(DevRelation::getTargetId, devMessagePageParam.getReceiveUserId())).stream()
|
.eq(DevRelation::getTargetId, devMessagePageParam.getReceiveUserId())).stream()
|
||||||
.map(DevRelation::getObjectId).collect(Collectors.toList()));
|
.map(DevRelation::getObjectId).collect(Collectors.toList()));
|
||||||
|
|
|
@ -130,7 +130,7 @@ public class MobileMenuController {
|
||||||
* @author xuyuxiang
|
* @author xuyuxiang
|
||||||
* @date 2022/4/24 20:00
|
* @date 2022/4/24 20:00
|
||||||
*/
|
*/
|
||||||
@ApiOperationSupport(order = 8)
|
@ApiOperationSupport(order = 6)
|
||||||
@ApiOperation("获取模块选择器")
|
@ApiOperation("获取模块选择器")
|
||||||
@GetMapping("/mobile/menu/moduleSelector")
|
@GetMapping("/mobile/menu/moduleSelector")
|
||||||
public CommonResult<List<MobileModule>> moduleSelector(MobileMenuSelectorModuleParam mobileMenuSelectorModuleParam) {
|
public CommonResult<List<MobileModule>> moduleSelector(MobileMenuSelectorModuleParam mobileMenuSelectorModuleParam) {
|
||||||
|
@ -143,7 +143,7 @@ public class MobileMenuController {
|
||||||
* @author xuyuxiang
|
* @author xuyuxiang
|
||||||
* @date 2022/4/24 20:00
|
* @date 2022/4/24 20:00
|
||||||
*/
|
*/
|
||||||
@ApiOperationSupport(order = 9)
|
@ApiOperationSupport(order = 7)
|
||||||
@ApiOperation("获取菜单树选择器")
|
@ApiOperation("获取菜单树选择器")
|
||||||
@GetMapping("/mobile/menu/menuTreeSelector")
|
@GetMapping("/mobile/menu/menuTreeSelector")
|
||||||
public CommonResult<List<Tree<String>>> menuTreeSelector(MobileMenuSelectorMenuParam mobileMenuSelectorMenuParam) {
|
public CommonResult<List<Tree<String>>> menuTreeSelector(MobileMenuSelectorMenuParam mobileMenuSelectorMenuParam) {
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class SysIndexServiceImpl implements SysIndexService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SysIndexScheduleListResult> scheduleList(SysIndexScheduleListParam sysIndexScheduleListParam) {
|
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::getTargetId, sysIndexScheduleListParam.getScheduleDate())
|
||||||
.eq(SysRelation::getCategory, SysRelationCategoryEnum.SYS_USER_SCHEDULE_DATA.getValue()))
|
.eq(SysRelation::getCategory, SysRelationCategoryEnum.SYS_USER_SCHEDULE_DATA.getValue()))
|
||||||
.stream().map(sysRelation -> {
|
.stream().map(sysRelation -> {
|
||||||
|
|
|
@ -130,11 +130,11 @@ public class SysButtonServiceImpl extends ServiceImpl<SysButtonMapper, SysButton
|
||||||
List<String> buttonIdList = CollStreamUtil.toList(sysButtonIdParamList, SysButtonIdParam::getId);
|
List<String> buttonIdList = CollStreamUtil.toList(sysButtonIdParamList, SysButtonIdParam::getId);
|
||||||
if(ObjectUtil.isNotEmpty(buttonIdList)) {
|
if(ObjectUtil.isNotEmpty(buttonIdList)) {
|
||||||
// 获取按钮的父菜单id集合
|
// 获取按钮的父菜单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)
|
.eq(SysMenu::getCategory, SysResourceCategoryEnum.BUTTON.getValue())).stream().map(SysMenu::getParentId)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if(ObjectUtil.isNotEmpty(parentMenuIdList)) {
|
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())
|
.eq(SysRelation::getCategory, SysRelationCategoryEnum.SYS_ROLE_HAS_RESOURCE.getValue())
|
||||||
.isNotNull(SysRelation::getExtJson)).forEach(sysRelation -> {
|
.isNotNull(SysRelation::getExtJson)).forEach(sysRelation -> {
|
||||||
JSONObject extJsonObject = JSONUtil.parseObj(sysRelation.getExtJson());
|
JSONObject extJsonObject = JSONUtil.parseObj(sysRelation.getExtJson());
|
||||||
|
|
|
@ -254,7 +254,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
|
||||||
List<String> sysMenuIdList = CollStreamUtil.toList(sysMenuIdParamList, SysMenuIdParam::getId);
|
List<String> sysMenuIdList = CollStreamUtil.toList(sysMenuIdParamList, SysMenuIdParam::getId);
|
||||||
if(ObjectUtil.isNotEmpty(sysMenuIdList)) {
|
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(),
|
.in(SysMenu::getCategory, CollectionUtil.newArrayList(SysResourceCategoryEnum.MENU.getValue(),
|
||||||
SysResourceCategoryEnum.BUTTON.getValue())));
|
SysResourceCategoryEnum.BUTTON.getValue())));
|
||||||
List<String> toDeleteMenuIdList = CollectionUtil.newArrayList();
|
List<String> toDeleteMenuIdList = CollectionUtil.newArrayList();
|
||||||
|
|
|
@ -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(),
|
.in(SysMenu::getCategory, CollectionUtil.newArrayList(SysResourceCategoryEnum.MENU.getValue(),
|
||||||
SysResourceCategoryEnum.BUTTON.getValue())));
|
SysResourceCategoryEnum.BUTTON.getValue())));
|
||||||
if(ObjectUtil.isNotEmpty(allMenuList)) {
|
if(ObjectUtil.isNotEmpty(allMenuList)) {
|
||||||
|
|
Loading…
Reference in New Issue