fix(order): 修复订单查询逻辑

- 在查询条件中添加了 goodsId 过滤
- 为避免多余数据返回,增加了 limit 1 限制
- 确保订单项查询的准确性与性能优化
This commit is contained in:
2025-11-21 15:02:26 +08:00
parent caad0c2cf0
commit 038b2e6f08

View File

@@ -514,6 +514,7 @@
<if test="goodsId != null">
and oi.goods_id = #{goodsId}
</if>
limit 1
</select>
<select id="getOrderItems" resultType="com.ycwl.basic.model.pc.order.entity.OrderItemEntity">
select * from order_item where order_id = #{orderId}