|
@@ -19,11 +19,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
<result property="remark" column="remark" />
|
|
|
+ <result property="parentId" column="parent_id" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectRoleVo">
|
|
|
select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
|
|
|
- r.status, r.del_flag, r.create_time, r.remark, r.tenant_id,r.authority_lv
|
|
|
+ r.status, r.del_flag, r.create_time, r.remark, r.tenant_id,r.authority_lv,r.parent_id
|
|
|
from sys_role r
|
|
|
left join sys_user_role ur on ur.role_id = r.role_id
|
|
|
left join sys_user u on u.user_id = ur.user_id
|
|
@@ -123,6 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
|
|
|
<if test="authorityLv != null and authorityLv != ''">authority_lv,</if>
|
|
|
+ <if test="parentId != null and parentId != ''">parent_id,</if>
|
|
|
create_time
|
|
|
)values(
|
|
|
<if test="roleId != null and roleId != 0">#{roleId},</if>
|
|
@@ -137,7 +139,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
|
|
|
<if test="authorityLv != null and authorityLv != ''">#{authorityLv},</if>
|
|
|
- sysdate()
|
|
|
+ <if test="parentId != null and parentId != ''">#{parentId},</if>
|
|
|
+ sysdate()
|
|
|
)
|
|
|
</insert>
|
|
|
|
|
@@ -154,6 +157,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
|
<if test="authorityLv != null and authorityLv != ''">authority_lv = #{authorityLv},</if>
|
|
|
+ <if test="parentId != null and parentId != ''">parent_id = #{parentId},</if>
|
|
|
update_time = sysdate()
|
|
|
</set>
|
|
|
where role_id = #{roleId}
|