数据权限的bug修改260113
This commit is contained in:
@@ -102,11 +102,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
set del_flag = 2,
|
||||
update_time = now()
|
||||
where del_flag = 1
|
||||
<if test="topOrganizationId != null and topOrganizationId != ''">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<!-- 必须匹配 organizationId,确保只删除当前登录用户组织的数据 -->
|
||||
<!-- 只根据 organizationId 来删除,不使用 topOrganizationId -->
|
||||
<if test="organizationId != null and organizationId != ''">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<!-- 如果 organizationId 为空,则不执行删除操作,防止误删所有数据 -->
|
||||
<if test="organizationId == null or organizationId == ''">
|
||||
and 1 = 0
|
||||
</if>
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user