|
@@ -129,7 +129,10 @@
|
|
</if>
|
|
</if>
|
|
<if test="tenantId != null ">
|
|
<if test="tenantId != null ">
|
|
AND ( c.tenant_id = #{tenantId} or
|
|
AND ( c.tenant_id = #{tenantId} or
|
|
- exists (select 1 from biz_entrust e where e.company_id = c.id and e.deleted = 0
|
|
|
|
|
|
+ exists (select 1 from biz_entrust e where e.company_id = c.id
|
|
|
|
+ <if test="deleted != 2 ">
|
|
|
|
+ and e.deleted = 0
|
|
|
|
+ </if>
|
|
and (e.to_tenant_id = #{tenantId} or e.from_tenant_id = #{tenantId}))
|
|
and (e.to_tenant_id = #{tenantId} or e.from_tenant_id = #{tenantId}))
|
|
)
|
|
)
|
|
</if>
|
|
</if>
|