refactor(sql): 将左连接改为内连接
- 修改了 WmsCoilPendingActionMapper.xml 中的 SQL 查询语句 - 将 LEFT JOIN 替换为 INNER JOIN 以提高数据检索效率 - 确保只有存在有效关联记录时才返回结果 - 保持原有的删除标记过滤条件不变 - 更新了表别名引用以匹配新的连接逻辑 - 验证了自定义 SQL 片段的兼容性
This commit is contained in:
@@ -47,7 +47,7 @@
|
|||||||
wmc.item_id as itemId,
|
wmc.item_id as itemId,
|
||||||
wmc.item_type as itemType
|
wmc.item_type as itemType
|
||||||
from wms_coil_pending_action wcpa
|
from wms_coil_pending_action wcpa
|
||||||
LEFT JOIN wms_material_coil wmc ON wcpa.coil_id = wmc.coil_id AND wmc.del_flag = 0
|
inner join wms_material_coil wmc ON wcpa.coil_id = wmc.coil_id AND wmc.del_flag = 0
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user