123456789101112131415161718192021222324252627282930313233 |
- <?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.gxzc.zen.api.sys.mapper.SysRoleMapper">
- <!-- 通用查询映射结果 -->
- <resultMap id="BaseResultMap" type="com.gxzc.zen.api.sys.model.SysRole">
- <result column="id" property="id" />
- <result column="enable" property="enable" />
- <result column="remark" property="remark" />
- <result column="create_time" property="createTime" />
- <result column="create_by" property="createBy" />
- <result column="update_time" property="updateTime" />
- <result column="update_by" property="updateBy" />
- <result column="parent_id" property="parentId" />
- <result column="name" property="name" />
- <result column="path" property="path" />
- <result column="code" property="code" />
- <result column="ext1" property="ext1" />
- <result column="ext2" property="ext2" />
- <result column="ext3" property="ext3" />
- <result column="ext4" property="ext4" />
- <result column="ext5" property="ext5" />
- </resultMap>
- <select id="selectByUserId" resultType="com.gxzc.zen.api.sys.model.SysRole">
- SELECT A.*
- FROM sys_role AS A
- INNER JOIN sys_user_role AS B ON A.id = B.role_id
- WHERE B.user_id = #{userId}
- AND A.enable = 1
- </select>
- </mapper>
|