| 
					
				 | 
			
			
				@@ -136,6 +136,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<select id="getRoleKey" resultType="java.lang.String"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		select role_key from sys_role where role_id = #{roleId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	<select id="roleList" resultMap="SysRoleResult" parameterType="com.ozs.common.core.domain.vo.SysRoleRequestVo"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		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.update_by,r.update_time 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		from sys_role r 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		left  join sys_user_role ur on ur.role_id = r.role_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		left join sys_user u on u.id = ur.user_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			<if test="roleName != null and roleName != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				and r.role_name like concat('%', #{roleName}, '%') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			<if test="roleId != null and roleId != 0"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				and r.role_id = #{roleId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			<if test="status != null and status != 0"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				and r.status=#{status} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			<if test="status == null || status == ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				AND r.status = '1' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			<if test="!dsFlay"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				and 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				<trim prefix="(" prefixOverrides="or" suffix=")"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					<if test="dsUserId != null and dsUserId != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						or r.create_by=#{dsUserId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					<if test="dsDeptId != null and dsDeptId != 0"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						or u.dept_id=#{dsDeptId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					<if test="dsDeptIds != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						or	u.dept_id in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						<foreach item="item" collection="dsDeptIds" separator="," open="(" close=")" index=""> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							#{item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						</foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				</trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			and r.del_flag = '1' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		</where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		order by r.role_sort 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	</select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  		insert into sys_role( 
			 |