From d32687c27ed783f64ef2706865a0689406bc0745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Tue, 12 Aug 2025 11:39:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(shop):=20=E5=A2=9E=E5=BC=BA=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在订单查询中增加用户昵称搜索功能- 优化订单关键词搜索逻辑,支持昵称和电话号码搜索- 扩展退款/售后状态的订单查询范围 -调整订单状态查询条件,提高查询准确性 --- .../gxwebsoft/shop/mapper/xml/ShopOrderMapper.xml | 15 ++++++++++----- .../com/gxwebsoft/shop/param/ShopOrderParam.java | 4 ++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gxwebsoft/shop/mapper/xml/ShopOrderMapper.xml b/src/main/java/com/gxwebsoft/shop/mapper/xml/ShopOrderMapper.xml index f6aa55e..c69c966 100644 --- a/src/main/java/com/gxwebsoft/shop/mapper/xml/ShopOrderMapper.xml +++ b/src/main/java/com/gxwebsoft/shop/mapper/xml/ShopOrderMapper.xml @@ -57,7 +57,10 @@ AND a.real_name LIKE CONCAT('%', #{param.realName}, '%') - AND a.phone LIKE CONCAT('%', #{param.phone}, '%') + AND b.phone LIKE CONCAT('%', #{param.phone}, '%') + + + AND b.nickname LIKE CONCAT('%', #{param.nickname}, '%') AND a.address_id = #{param.addressId} @@ -211,9 +214,11 @@ AND (a.order_no LIKE CONCAT('%', #{param.keywords}, '%') - OR b.phone = #{param.keywords} - OR a.order_id = #{param.keywords} OR a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR a.order_id = #{param.keywords} + OR b.phone = #{param.keywords} + OR b.phone = #{param.keywords} + OR b.nickname LIKE CONCAT('%', #{param.keywords}, '%') ) @@ -243,8 +248,8 @@ AND a.order_status = 1 - - AND a.order_status = 6 + + AND (a.order_status = 4 OR a.order_status = 5 OR a.order_status = 6 OR a.order_status = 7) diff --git a/src/main/java/com/gxwebsoft/shop/param/ShopOrderParam.java b/src/main/java/com/gxwebsoft/shop/param/ShopOrderParam.java index b5ec35a..dd57e5d 100644 --- a/src/main/java/com/gxwebsoft/shop/param/ShopOrderParam.java +++ b/src/main/java/com/gxwebsoft/shop/param/ShopOrderParam.java @@ -234,6 +234,10 @@ public class ShopOrderParam extends BaseParam { @QueryField(type = QueryType.EQ) private Integer userId; + @Schema(description = "用户昵称") + @QueryField(type = QueryType.LIKE) + private String nickname; + @Schema(description = "备注") private String comments;