From d6d82f2377dcce280a6bd2bbd6f7a7bc60540d6b Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Wed, 8 Mar 2023 11:05:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/xkrs/service/SysAuthorityService.java | 8 -------- .../com/xkrs/service/impl/SysAuthorityServiceImpl.java | 5 ----- src/main/java/com/xkrs/straw/dao/SysAuthorityDao.java | 8 -------- 3 files changed, 21 deletions(-) diff --git a/src/main/java/com/xkrs/service/SysAuthorityService.java b/src/main/java/com/xkrs/service/SysAuthorityService.java index 55a3257..bf384fe 100644 --- a/src/main/java/com/xkrs/service/SysAuthorityService.java +++ b/src/main/java/com/xkrs/service/SysAuthorityService.java @@ -11,14 +11,6 @@ import java.util.List; */ public interface SysAuthorityService { - /** - * 获取权限实体列表根据用户名 - * - * @param userName - * @return - */ - List getSysAuthorityListByUserName(String userName); - List findAllByIdIn(List id); List selectAuthorityByUserId(Long userId); diff --git a/src/main/java/com/xkrs/service/impl/SysAuthorityServiceImpl.java b/src/main/java/com/xkrs/service/impl/SysAuthorityServiceImpl.java index 8b9d060..7dc6f32 100644 --- a/src/main/java/com/xkrs/service/impl/SysAuthorityServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/SysAuthorityServiceImpl.java @@ -23,11 +23,6 @@ public class SysAuthorityServiceImpl implements SysAuthorityService { @Resource private RelRoleAuthorityDao relRoleAuthorityDao; - @Override - public List getSysAuthorityListByUserName(String userName) { - return sysAuthorityDao.selectByUserName(userName); - } - @Override public List findAllByIdIn(List id) { return sysAuthorityDao.findAllByIdIn(id); diff --git a/src/main/java/com/xkrs/straw/dao/SysAuthorityDao.java b/src/main/java/com/xkrs/straw/dao/SysAuthorityDao.java index ec25ff2..f9d4540 100644 --- a/src/main/java/com/xkrs/straw/dao/SysAuthorityDao.java +++ b/src/main/java/com/xkrs/straw/dao/SysAuthorityDao.java @@ -3,8 +3,6 @@ package com.xkrs.straw.dao; import com.xkrs.straw.model.entity.SysAuthorityEntity; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.data.jpa.repository.Query; -import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Component; import java.util.List; @@ -12,12 +10,6 @@ import java.util.List; @Component public interface SysAuthorityDao extends JpaRepository, JpaSpecificationExecutor { - /** - * 查询权限实体列表根据用户名 Object[] - */ - @Query(value = "SELECT a.id, a.authority_name, a.authority_name_zh, a.authority_desc FROM sys_authority a,rel_role_authority ra,sys_role r WHERE r.id = ra.role_id AND ra.authority_id = a.id AND r.id IN (SELECT r.id FROM sys_user u,sys_role r,rel_user_role ur WHERE u.user_name = :userName AND u.id = ur.user_id AND ur.role_id = r.id)", nativeQuery = true) - List selectByUserName(@Param("userName") String userName); - /** * 根据id批量查询权限信息 */