| | |
| | | WHERE r.del_flag = '0' and u.user_name = #{userName} |
| | | </select> |
| | | |
| | | <select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult"> |
| | | <select id="checkRoleNameUnique" parameterType="com.ruoyi.common.core.domain.entity.SysRole" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | where r.role_name=#{roleName} and r.del_flag = '0' limit 1 |
| | | where r.role_name=#{roleName} |
| | | and r.del_flag = '0' |
| | | <if test="orgid != null and orgid != ''"> |
| | | and r.orgid = #{orgid} |
| | | </if> |
| | | limit 1 |
| | | </select> |
| | | |
| | | <select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult"> |
| | | <select id="checkRoleKeyUnique" parameterType="com.ruoyi.common.core.domain.entity.SysRole" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | where r.role_key=#{roleKey} and r.del_flag = '0' limit 1 |
| | | where r.role_key=#{roleKey} |
| | | and r.del_flag = '0' |
| | | <if test="orgid != null and orgid != ''"> |
| | | and r.orgid = #{orgid} |
| | | </if> |
| | | limit 1 |
| | | </select> |
| | | |
| | | <insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId"> |