fix(backoffice): restore Smilegate group and role mappers
This commit is contained in:
@@ -7,8 +7,7 @@
|
||||
role_name,
|
||||
description,
|
||||
max_sensitivity_level
|
||||
FROM hmm_access_roles
|
||||
WHERE active_yn = 'Y'
|
||||
FROM sg_app_role
|
||||
ORDER BY role_name
|
||||
</select>
|
||||
|
||||
@@ -17,45 +16,44 @@
|
||||
role_name,
|
||||
description,
|
||||
max_sensitivity_level
|
||||
FROM hmm_access_roles
|
||||
FROM sg_app_role
|
||||
WHERE role_id = #{roleId}
|
||||
</select>
|
||||
|
||||
<select id="nextRoleId" resultType="long">
|
||||
SELECT NVL(MAX(role_id), 0) + 1 FROM hmm_access_roles
|
||||
SELECT NVL(MAX(role_id), 0) + 1 FROM sg_app_role
|
||||
</select>
|
||||
|
||||
<insert id="insertRole">
|
||||
INSERT INTO hmm_access_roles (role_id, role_name, description, max_sensitivity_level, active_yn)
|
||||
INSERT INTO sg_app_role (role_id, role_name, description, max_sensitivity_level)
|
||||
VALUES (
|
||||
#{roleId,jdbcType=NUMERIC},
|
||||
UPPER(#{roleName,jdbcType=VARCHAR}),
|
||||
#{description,jdbcType=VARCHAR},
|
||||
#{maxSensitivityLevel,jdbcType=VARCHAR},
|
||||
'Y'
|
||||
#{maxSensitivityLevel,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateRoleMaxSensitivity">
|
||||
UPDATE hmm_access_roles
|
||||
UPDATE sg_app_role
|
||||
SET max_sensitivity_level = #{maxSensitivityLevel,jdbcType=VARCHAR}
|
||||
WHERE role_id = #{roleId,jdbcType=NUMERIC}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRole">
|
||||
DELETE FROM hmm_access_roles
|
||||
DELETE FROM sg_app_role
|
||||
WHERE role_id = #{roleId,jdbcType=NUMERIC}
|
||||
</delete>
|
||||
|
||||
<select id="countUserRolesByRoleId" resultType="int">
|
||||
SELECT COUNT(*)
|
||||
FROM hmm_employee_access_roles
|
||||
FROM sg_user_role
|
||||
WHERE role_id = #{roleId,jdbcType=NUMERIC}
|
||||
</select>
|
||||
|
||||
<select id="countGroupRolesByRoleId" resultType="int">
|
||||
SELECT COUNT(*)
|
||||
FROM hmm_group_access_roles
|
||||
FROM sg_group_role
|
||||
WHERE role_id = #{roleId,jdbcType=NUMERIC}
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user