| | |
| | | where r.role_key=#{roleKey} and r.del_flag = '0' limit 1 |
| | | </select> |
| | | <select id="isExitUpdate" resultType="com.ruoyi.system.api.domain.SysRole"> |
| | | select role_name romeName from sys_role where role_name=#{roleName} and companyId =#{companyId} and role_id != #{roleId} |
| | | select role_name romeName from sys_role where role_name=#{roleName} and role_id != #{roleId} |
| | | </select> |
| | | |
| | | <insert id="insertRole" parameterType="com.ruoyi.system.api.domain.SysRole" useGeneratedKeys="true" keyProperty="roleId"> |
| | |
| | | <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> |
| | | <if test="roleSort != null">role_sort,</if> |
| | | <if test="dataScope != null and dataScope != ''">data_scope,</if> |
| | | <if test="menuCheckStrictly != null">menu_check_strictly,</if> |
| | | <if test="deptCheckStrictly != null">dept_check_strictly,</if> |
| | | <if test="status != null and status != ''">status,</if> |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | <if test="carDataAuth != null and carDataAuth != ''">carDataAuth,</if> |
| | | <if test="carTrainOperAuth != null and carTrainOperAuth != ''">carTrainOperAuth,</if> |
| | | <if test="contractDataAuth != null and contractDataAuth != ''">contractDataAuth,</if> |
| | | <if test="companyId != null and companyId != ''">companyId,</if> |
| | | create_time |
| | | )values( |
| | | <if test="roleId != null and roleId != 0">#{roleId},</if> |
| | | <if test="roleName != null and roleName != ''">#{roleName},</if> |
| | | <if test="roleKey != null and roleKey != ''">#{roleKey},</if> |
| | | <if test="roleSort != null">#{roleSort},</if> |
| | | <if test="dataScope != null and dataScope != ''">#{dataScope},</if> |
| | | <if test="menuCheckStrictly != null">#{menuCheckStrictly},</if> |
| | | <if test="deptCheckStrictly != null">#{deptCheckStrictly},</if> |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | <if test="carDataAuth != null and carDataAuth != ''">#{carDataAuth},</if> |
| | | <if test="carTrainOperAuth != null and carTrainOperAuth != ''">#{carTrainOperAuth},</if> |
| | | <if test="contractDataAuth != null and contractDataAuth != ''">#{contractDataAuth},</if> |
| | | <if test="companyId != null and companyId != ''">#{companyId},</if> |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | |
| | | <set> |
| | | <if test="roleName != null and roleName != ''">role_name = #{roleName},</if> |
| | | <if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if> |
| | | <if test="roleSort != null">role_sort = #{roleSort},</if> |
| | | <if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if> |
| | | <if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if> |
| | | <if test="deptCheckStrictly != null">dept_check_strictly = #{deptCheckStrictly},</if> |
| | | <if test="status != null and status != ''">status = #{status},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | <if test="carDataAuth != null and carDataAuth != ''">carDataAuth = #{carDataAuth},</if> |
| | | <if test="carTrainOperAuth != null and carTrainOperAuth != ''">carTrainOperAuth = #{carTrainOperAuth},</if> |
| | | <if test="contractDataAuth != null and contractDataAuth != ''">contractDataAuth = #{contractDataAuth},</if> |
| | | update_time = sysdate() |
| | | </set> |
| | | where role_id = #{roleId} |