feat: implement authority deletion functionality and related repository methods

This commit is contained in:
siujamo
2026-03-23 15:39:44 +08:00
parent aebb693ee7
commit 69e3f84bec
9 changed files with 66 additions and 6 deletions
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.onixbyte.helix.mapper.AuthorityMapper">
<select id="selectByUserId" parameterType="long">
<select id="selectByUserId" parameterType="long" resultType="com.onixbyte.helix.domain.entity.Authority">
SELECT DISTINCT a.id, a.code, a.name, a.description, a.status, a.created_at, a.updated_at
FROM authority a
JOIN role_authority ra ON a.id = ra.authority_id
@@ -7,4 +7,10 @@
FROM role_authority
WHERE role_id = #{roleId}
</delete>
<delete id="deleteByAuthorityId" parameterType="long">
DELETE
FROM role_authority
WHERE authority_id = #{authorityId}
</delete>
</mapper>
+1 -1
View File
@@ -52,7 +52,7 @@
</if>
</select>
<select id="count" parameterType="com.onixbyte.helix.domain.database.query.wrapper.QueryRoleWrapper">
<select id="count" parameterType="com.onixbyte.helix.domain.database.query.wrapper.QueryRoleWrapper" resultType="int">
SELECT COUNT(*)
FROM role
<where>