34 lines
1.4 KiB
XML
34 lines
1.4 KiB
XML
<?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="cn.axzo.tyr.server.repository.mapper.SaasRoleUserRelationMapper">
|
|
|
|
<select id="batListCleanRelation" resultType="cn.axzo.tyr.server.repository.entity.SaasRoleUserRelation">
|
|
SELECT DISTINCT ou_id AS ouId, workspace_id AS workspaceId,
|
|
natural_person_id AS naturalPersonId,
|
|
identity_id AS identityId, identity_type AS identityType
|
|
FROM saas_role_user_relation
|
|
WHERE is_delete = 0
|
|
<if test="param.ouId !=0 and param.ouId != null">
|
|
AND ou_id = #{param.ouId}
|
|
</if>
|
|
<if test="param.workspaceId !=0 and param.workspaceId != null">
|
|
AND workspace_id = #{param.workspaceId}
|
|
</if>
|
|
<if test="param.naturalPersonId !=0 and param.naturalPersonId != null">
|
|
AND natural_person_id = #{param.naturalPersonId}
|
|
</if>
|
|
</select>
|
|
|
|
<select id="listRoleIds" resultType="java.lang.Long">
|
|
SELECT DISTINCT role_id
|
|
FROM saas_role_user_relation
|
|
WHERE is_delete = 0
|
|
<if test="param.ouId !=0 and param.ouId != null">
|
|
AND ou_id = #{param.ouId}
|
|
</if>
|
|
<if test="param.workspaceId !=0 and param.workspaceId != null">
|
|
AND workspace_id = #{param.workspaceId}
|
|
</if>
|
|
</select>
|
|
</mapper> |