From 40bfb646d1b962d33841c1ebbceb0dd7cb668bfb Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期二, 29 四月 2025 14:54:04 +0800 Subject: [PATCH] 后台日志管理 --- springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/RoleDAO.java | 23 ++++++++++++++++------- 1 files changed, 16 insertions(+), 7 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/RoleDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/RoleDAO.java index 9a66cfe..b3fef7d 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/RoleDAO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/RoleDAO.java @@ -1,12 +1,13 @@ package com.panzhihua.service_user.dao; +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.springframework.web.bind.annotation.RequestParam; + import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.panzhihua.common.model.vos.MenuVO; import com.panzhihua.service_user.model.dos.SysRoleDO; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Select; - -import java.util.List; /** * @program: springcloud_k8s_panzhihuazhihuishequ @@ -16,10 +17,18 @@ **/ @Mapper public interface RoleDAO extends BaseMapper<SysRoleDO> { - @Select("select r.* from sys_user_role u join sys_role r on u.role_id=r.role_id where u.user_id=#{userId}") + List<SysRoleDO> selectByUserId(Long userId); - @Select("select r.role_key role,m.component url from sys_role r join sys_role_menu rm on r.role_id=rm.role_id join sys_menu m on rm.menu_id=m.menu_id WHERE m.component is not null ") + + List<MenuVO> selectAllMenuUrl(); - @Select("select r.role_key from sys_user_role ur join sys_role r on ur.role_id = r.role_id where ur.user_id=#{username}") + + List<String> selectRoles(String username); + + + Long selectMaxRole(Long communityId); + + + void deleteByRoleKey(@RequestParam("roleKey") String roleKey); } -- Gitblit v1.7.1