fix(query): 修复查询时未考虑 del_flag 导致返回已删除数据问题

- 在多个 Mapper 文件中,为 LEFT JOIN 的条件添加 del_flag = 0 判断
- 确保查询结果中不包含已删除的数据
This commit is contained in:
2025-08-26 16:42:29 +08:00
parent 045096b579
commit 666c42a128
15 changed files with 29 additions and 29 deletions

View File

@@ -43,7 +43,7 @@
oe.remark,
su.nick_name as ownerName
from wms_express oe
left join sys_user su on su.user_id = oe.owner_id
left join sys_user su on su.user_id = oe.owner_id and su.del_flag = 0
${ew.customSqlSegment}
</select>
<select id="selectVoByIdPlus" resultType="com.klp.domain.vo.WmsExpressVo">
@@ -66,7 +66,7 @@
oe.remark,
su.nick_name as ownerName
from wms_express oe
left join sys_user su on su.user_id = oe.owner_id
left join sys_user su on su.user_id = oe.owner_id and su.del_flag = 0
where express_id = #{expressId}
</select>