Commit 25393e78 authored by fangxinjiang's avatar fangxinjiang

菜单角色 调优

parent dbea4373
......@@ -62,6 +62,7 @@ public class MenuController {
*/
@GetMapping("/page")
public R<IPage<List<SysMenu>>> getMenuPage(Page page, SysMenu sysMenu) {
sysMenu.setClientId(ClientNameConstants.CLIENT_MVP);
return R.ok(sysMenuService.getMenuPage(page, sysMenu));
}
......
......@@ -129,6 +129,7 @@ public class RoleController {
*/
@GetMapping("/page")
public R<IPage<SysRole>> getRolePage(Page page, SysRole sysRole) {
sysRole.setClientId(ClientNameConstants.CLIENT_MVP);
return R.ok(sysRoleService.getSysRoleByPage(page, sysRole));
}
......
......@@ -218,6 +218,9 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
if (StrUtil.isNotBlank(sysMenu.getDelFlag())){
wrapper.eq(SysMenu::getDelFlag,sysMenu.getDelFlag());
}
if (StrUtil.isNotBlank(sysMenu.getClientId())){
wrapper.eq(SysMenu::getClientId,sysMenu.getClientId());
}
return wrapper;
}
......
......@@ -167,6 +167,9 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
if (StrUtil.isNotBlank(sysRole.getRoleName())){
wrapper.likeRight(SysRole::getRoleName,sysRole.getRoleName());
}
if (Common.isNotNull(sysRole.getClientId())){
wrapper.eq(SysRole::getClientId,sysRole.getClientId());
}
wrapper.orderByDesc(BaseEntity::getCreateTime);
return wrapper;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment