| | |
| | | |
| | | <select id="selectRoleList" parameterType="com.ycl.system.entity.SysRole" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | where r.del_flag = '0' |
| | | where r.del_flag = 0 |
| | | <if test="roleId != null and roleId != 0"> |
| | | AND r.role_id = #{roleId} |
| | | </if> |
| | |
| | | |
| | | <select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | WHERE r.del_flag = '0' and ur.user_id = #{userId} |
| | | WHERE r.del_flag = 0 and ur.user_id = #{userId} |
| | | </select> |
| | | |
| | | <select id="selectRoleAll" resultMap="SysRoleResult"> |
| | |
| | | |
| | | <select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | WHERE r.del_flag = '0' and u.user_name = #{userName} |
| | | WHERE r.del_flag = 0 and u.user_name = #{userName} |
| | | </select> |
| | | |
| | | <select id="checkRoleNameUnique" parameterType="String" 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 limit 1 |
| | | </select> |
| | | |
| | | <select id="checkRoleKeyUnique" parameterType="String" 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 limit 1 |
| | | </select> |
| | | |
| | | <select id="selectRoleByKey" resultType="com.ycl.system.entity.SysRole"> |
| | | select * from sys_role where role_key = #{roleKey} and del_flag = '0' limit 1 |
| | | select * from sys_role where role_key = #{roleKey} and del_flag = 0 limit 1 |
| | | </select> |
| | | |
| | | <insert id="insertRole" parameterType="com.ycl.system.entity.SysRole" useGeneratedKeys="true" keyProperty="roleId"> |