fix(query): 修复查询时未考虑 del_flag 导致返回已删除数据问题
- 在多个 Mapper 文件中,为 LEFT JOIN 的条件添加 del_flag = 0 判断 - 确保查询结果中不包含已删除的数据
This commit is contained in:
@@ -41,9 +41,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
ELSE NULL
|
||||
END AS itemCode
|
||||
FROM wms_stock s
|
||||
LEFT JOIN wms_product p ON s.item_type = 'product' AND s.item_id = p.product_id
|
||||
LEFT JOIN wms_raw_material r ON s.item_type = 'raw_material' AND s.item_id = r.raw_material_id
|
||||
left join wms_warehouse w on s.warehouse_id = w.warehouse_id
|
||||
LEFT JOIN wms_product p ON s.item_type = 'product' AND s.item_id = p.product_id and p.del_flag = 0
|
||||
LEFT JOIN wms_raw_material r ON s.item_type = 'raw_material' AND s.item_id = r.raw_material_id and r.del_flag = 0
|
||||
left join wms_warehouse w on s.warehouse_id = w.warehouse_id and w.del_flag = 0
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user