From 16e8c7adbee6c9ee9bac09a80d44d3bfd3fe2f0c Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期一, 19 五月 2025 09:45:38 +0800
Subject: [PATCH] Merge branch '2.0.2' into 2.0.1
---
server/service/src/main/resources/mappers/SystemPermissionMapper.xml | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/server/service/src/main/resources/mappers/SystemPermissionMapper.xml b/server/service/src/main/resources/mappers/SystemPermissionMapper.xml
index 9568ef5..d584db7 100644
--- a/server/service/src/main/resources/mappers/SystemPermissionMapper.xml
+++ b/server/service/src/main/resources/mappers/SystemPermissionMapper.xml
@@ -16,7 +16,7 @@
</resultMap>
<select id="selectManageList" resultMap="SystemPermissionListVO">
SELECT
- perm.`ID`, perm.`CODE`, perm.`NAME`, perm.`REMARK`, perm.`FIXED`, perm.`CREATE_TIME`, perm.`UPDATE_TIME`, perm.`CREATE_USER`, perm.`UPDATE_USER`, perm.`DELETED`,
+ perm.*,
create_user.ID CREATE_USER_ID, create_user.`USERNAME` CREATE_USER_NAME,
update_user.ID UPDETE_USER_ID, update_user.`USERNAME` UPDATE_USER_NAME
FROM SYSTEM_PERMISSION perm
@@ -24,10 +24,22 @@
LEFT JOIN `SYSTEM_USER` update_user ON update_user.ID = perm.UPDATE_USER
<where>
perm.DELETED = 0
- <if test="dto.code != null">
+ <if test="dto.code != null and dto.code!=''">
AND perm.CODE LIKE CONCAT('%', #{dto.code}, '%')
</if>
- <if test="dto.name != null">
+ <if test="dto.type != null">
+ AND ifnull(perm.type,0) in(0, ${dto.type})
+ </if>
+ <if test="dto.iscom != null">
+ AND ifnull(perm.iscom,0) =${dto.iscom}
+ </if>
+ <if test="dto.isshop != null">
+ AND ifnull(perm.isshop,0)=${dto.isshop}
+ </if>
+ <if test="dto.isadmin != null">
+ AND ifnull(perm.isadmin,0) = ${dto.isadmin}
+ </if>
+ <if test="dto.name != null and dto.name!=''">
AND perm.`NAME` LIKE CONCAT('%', #{dto.name}, '%')
</if>
</where>
@@ -37,7 +49,7 @@
<!-- 鏍规嵁鐢ㄦ埛ID鏌ヨ鏉冮檺 -->
<select id="selectByUserId" parameterType="java.lang.Integer" resultType="com.doumee.dao.system.model.SystemPermission">
SELECT
- perm.`ID`, perm.`CODE`, perm.`NAME`, perm.`REMARK`, perm.`CREATE_TIME`, perm.`UPDATE_TIME`, perm.`CREATE_USER`, perm.`UPDATE_USER`, perm.`DELETED`
+ perm.*
FROM SYSTEM_PERMISSION perm
INNER JOIN SYSTEM_ROLE_PERMISSION role_perm ON role_perm.PERMISSION_ID = perm.ID AND role_perm.DELETED = 0
INNER JOIN SYSTEM_ROLE role ON role.ID = role_perm.ROLE_ID AND role.DELETED = 0
@@ -51,7 +63,7 @@
<!-- 鏍规嵁瑙掕壊ID鏌ヨ鏉冮檺 -->
<select id="selectByRoleId" parameterType="java.lang.Integer" resultType="com.doumee.dao.system.model.SystemPermission">
SELECT
- perm.`ID`, perm.`CODE`, perm.`NAME`, perm.`REMARK`, perm.`CREATE_TIME`, perm.`UPDATE_TIME`, perm.`CREATE_USER`, perm.`UPDATE_USER`, perm.`DELETED`
+ perm.*
FROM SYSTEM_PERMISSION perm
INNER JOIN SYSTEM_ROLE_PERMISSION role_perm ON role_perm.PERMISSION_ID = perm.ID AND role_perm.DELETED = 0
<where>
--
Gitblit v1.9.3