Explorar el Código

fix(order): 修复订单查询条件逻辑错误

- 移除注释掉的 or 条件代码
- 恢复 isNotNull 查询条件以正确过滤数据源不为空的订单
- 确保当指定了 assigneeType 时不丢失数据源过滤条件
hurx hace 12 horas
padre
commit
b47e99215b

+ 2 - 2
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/service/impl/OrderMainServiceImpl.java

@@ -496,8 +496,8 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
                 if (StringUtils.isNotBlank(bo.getAssigneeType())) {
                     lqw.and(wrapper -> wrapper
                         .eq(OrderMain::getAssigneeType, bo.getAssigneeType())
-//                        .or()
-//                        .isNotNull(OrderMain::getDataSource)
+                        .or()
+                        .isNotNull(OrderMain::getDataSource)
                     );
                 } else {
                     // 如果没有指定 assigneeType,只查询 dataSource 不为空的订单