diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/JDOrderListController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/JDOrderListController.java index 398d194..a403467 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/JDOrderListController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/JDOrderListController.java @@ -64,6 +64,12 @@ public class JDOrderListController extends BaseController query.getParams().put("hasFinishTime", true); } + // 处理混合搜索参数(订单号/第三方单号/分销标识) + String orderSearch = request.getParameter("orderSearch"); + if (orderSearch != null && !orderSearch.trim().isEmpty()) { + query.getParams().put("orderSearch", orderSearch.trim()); + } + java.util.List list; if (orderBy != null && !orderBy.isEmpty()) { // 设置排序参数 diff --git a/ruoyi-system/src/main/resources/mapper/jarvis/JDOrderMapper.xml b/ruoyi-system/src/main/resources/mapper/jarvis/JDOrderMapper.xml index 25a3e36..5a1ddc8 100644 --- a/ruoyi-system/src/main/resources/mapper/jarvis/JDOrderMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/jarvis/JDOrderMapper.xml @@ -42,15 +42,20 @@ and remark like concat('%', #{remark}, '%') - and distribution_mark like concat('%', #{distributionMark}, '%') + + and ( + order_id like concat('%', #{params.orderSearch}, '%') + or third_party_order_no like concat('%', #{params.orderSearch}, '%') + or distribution_mark like concat('%', #{params.orderSearch}, '%') + ) + + and distribution_mark = #{distributionMark} and model_number like concat('%', #{modelNumber}, '%') and link like concat('%', #{link}, '%') and payment_amount = #{paymentAmount} and rebate_amount = #{rebateAmount} and address like concat('%', #{address}, '%') and logistics_link like concat('%', #{logisticsLink}, '%') - and order_id like concat('%', #{orderId}, '%') - and third_party_order_no like concat('%', #{thirdPartyOrderNo}, '%') and buyer like concat('%', #{buyer}, '%') and order_time = #{orderTime} and status like concat('%', #{status}, '%') @@ -68,15 +73,20 @@ and remark like concat('%', #{remark}, '%') - and distribution_mark like concat('%', #{distributionMark}, '%') + + and ( + order_id like concat('%', #{params.orderSearch}, '%') + or third_party_order_no like concat('%', #{params.orderSearch}, '%') + or distribution_mark like concat('%', #{params.orderSearch}, '%') + ) + + and distribution_mark = #{distributionMark} and model_number like concat('%', #{modelNumber}, '%') and link like concat('%', #{link}, '%') and payment_amount = #{paymentAmount} and rebate_amount = #{rebateAmount} and address like concat('%', #{address}, '%') and logistics_link like concat('%', #{logisticsLink}, '%') - and order_id like concat('%', #{orderId}, '%') - and third_party_order_no like concat('%', #{thirdPartyOrderNo}, '%') and buyer like concat('%', #{buyer}, '%') and order_time = #{orderTime} and status like concat('%', #{status}, '%')