All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mapper.MkSecUserRoleMapper.xml Maven / Gradle / Ivy

There is a newer version: 1.0.0-beta10
Show newest version
<?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.github.xujiaji.mk.security.mapper.MkSecUserRoleMapper">

    <insert id="addSecUserRole">
        INSERT INTO mk_sec_user_role(sec_user_id, role_id, create_time)
        VALUES (${secUserId}, ${roleId}, NOW())
    </insert>

    <delete id="deleteBySecUserId">
        DELETE FROM mk_sec_user_role WHERE sec_user_id = ${secUserId}
    </delete>

    <select id="selectSecRoleBySecUserId" resultType="com.github.xujiaji.mk.security.entity.MkSecRole">
        SELECT
            sr.*
        FROM mk_sec_user_role sur
            LEFT JOIN mk_sec_role sr ON sr.id = sur.role_id
        WHERE sur.sec_user_id = #{secUserId}
    </select>
</mapper>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy