delete | delete | ||||
from authorities | from authorities | ||||
where user_id = #{userId} | where user_id = #{userId} | ||||
and client_id = #{clientId} | |||||
and authority = #{clientId} | |||||
</delete> | </delete> | ||||
<select id="selectByUserId" resultType="com.tuoheng.model.po.AuthoritiesPo"> | <select id="selectByUserId" resultType="com.tuoheng.model.po.AuthoritiesPo"> | ||||
SELECT id, user_id, username, authority | SELECT id, user_id, username, authority |
(#{it.userId}, #{it.username}, #{it.authority}, #{it.createUser}) | (#{it.userId}, #{it.username}, #{it.authority}, #{it.createUser}) | ||||
</foreach> | </foreach> | ||||
</insert> | </insert> | ||||
<delete id="deleteByUserIdAndClient"> | |||||
delete | |||||
from authorities | |||||
where user_id = #{userId} | |||||
and client_id = #{clientId} | |||||
</delete> | |||||
<select id="selectByUserId" resultType="com.tuoheng.model.po.AuthoritiesPo"> | <select id="selectByUserId" resultType="com.tuoheng.model.po.AuthoritiesPo"> | ||||
SELECT id, user_id, username, authority | SELECT id, user_id, username, authority | ||||
FROM authorities | FROM authorities |
</set> | </set> | ||||
where user_id = #{userId} and client_id = #{clientId} | where user_id = #{userId} and client_id = #{clientId} | ||||
</update> | </update> | ||||
<delete id="deleteByUserIdAndClient"> | |||||
delete | |||||
from t_client_user_role | |||||
where user_id = #{userId} | |||||
and client_id = #{clientId} | |||||
</delete> | |||||
<select id="selectListByUserId" resultType="com.tuoheng.model.po.ClientUserRolePo"> | <select id="selectListByUserId" resultType="com.tuoheng.model.po.ClientUserRolePo"> | ||||
SELECT * | SELECT * | ||||
FROM t_client_user_role | FROM t_client_user_role |