| | |
| | | userId, roleId |
| | | </sql> |
| | | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoBa.BaUserRole"> |
| | | <insert id="putin" parameterType="com.dy.pipIrrGlobal.pojoBa.BaUserRole"> |
| | | <!--@mbg.generated--> |
| | | insert into ba_user_role (userId, roleId) |
| | | values (#{userId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}) |
| | |
| | | where userId = #{roleId,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <!--根据用户编号获取权限列表--> |
| | | <select id="getPermissionsByUserId" resultType="java.util.Map"> |
| | | SELECT |
| | | rol.id AS roleId, |
| | | rol.`name` AS roleName, |
| | | per.id AS perId |
| | | FROM ba_user_role use_rol |
| | | INNER JOIN ba_role rol ON rol.id = use_rol.roleId |
| | | INNER JOIN ba_role_permissions per ON per.roleId = rol.id |
| | | WHERE use_rol.userId = ${userId} |
| | | |
| | | </select> |
| | | |
| | | </mapper> |