|
@@ -94,7 +94,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
|
|
|
- insert into sys_role(
|
|
|
+ <selectKey keyProperty="roleId" resultType="long" order="BEFORE">
|
|
|
+ SELECT SEQ_SYS_ROLE.NEXTVAL as roleId FROM DUAL
|
|
|
+ </selectKey>
|
|
|
+ insert into sys_role(
|
|
|
<if test="roleId != null and roleId != 0">role_id,</if>
|
|
|
<if test="roleName != null and roleName != ''">role_name,</if>
|
|
|
<if test="roleKey != null and roleKey != ''">role_key,</if>
|