2024-06-24 17:32:19 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.das.modules.auth.mapper.SysRoleMapper">
|
|
|
|
|
2024-06-25 17:41:41 +08:00
|
|
|
<resultMap type="com.das.modules.auth.entity.SysRole" id="SysRoleMap">
|
2024-06-24 17:32:19 +08:00
|
|
|
<result property="id" column="id" jdbcType="BIGINT"/>
|
|
|
|
<result property="roleCode" column="role_code" jdbcType="VARCHAR"/>
|
|
|
|
<result property="roleName" column="role_name" jdbcType="VARCHAR"/>
|
|
|
|
<result property="revision" column="revision" jdbcType="VARCHAR"/>
|
|
|
|
<result property="createdBy" column="created_by" jdbcType="VARCHAR"/>
|
|
|
|
<result property="createdTime" column="created_time" jdbcType="VARCHAR"/>
|
|
|
|
<result property="updatedBy" column="updated_by" jdbcType="VARCHAR"/>
|
|
|
|
<result property="updatedTime" column="updated_time" jdbcType="VARCHAR"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<select id="queryRoleList" resultMap="SysRoleMap">
|
|
|
|
select * from sys_role
|
|
|
|
<where>
|
|
|
|
<if test="sysRole.roleName != null and sysRole.roleName != ''">
|
|
|
|
and role_name like concat('%',#{sysRole.roleName},'%')
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
|
2024-06-25 14:57:19 +08:00
|
|
|
|
|
|
|
<select id="existRoleByRoleCode" resultType="java.lang.Long">
|
|
|
|
select count(1) from sys_role t where t.role_code=#{roleCode}
|
|
|
|
</select>
|
|
|
|
|
2024-06-24 17:32:19 +08:00
|
|
|
</mapper>
|