feat(shop): 增强订单查询功能
- 在订单查询中增加用户昵称搜索功能- 优化订单关键词搜索逻辑,支持昵称和电话号码搜索- 扩展退款/售后状态的订单查询范围 -调整订单状态查询条件,提高查询准确性
This commit is contained in:
@@ -57,7 +57,10 @@
|
|||||||
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
|
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="param.phone != null">
|
<if test="param.phone != null">
|
||||||
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
|
AND b.phone LIKE CONCAT('%', #{param.phone}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.nickname != null">
|
||||||
|
AND b.nickname LIKE CONCAT('%', #{param.nickname}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="param.addressId != null">
|
<if test="param.addressId != null">
|
||||||
AND a.address_id = #{param.addressId}
|
AND a.address_id = #{param.addressId}
|
||||||
@@ -211,9 +214,11 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="param.keywords != null">
|
<if test="param.keywords != null">
|
||||||
AND (a.order_no LIKE CONCAT('%', #{param.keywords}, '%')
|
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.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}, '%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<!-- 订单状态筛选:-1全部,0待支付,1待发货,2待核销,3待收货,4待评价,5已完成,6已退款,7已删除 -->
|
<!-- 订单状态筛选:-1全部,0待支付,1待发货,2待核销,3待收货,4待评价,5已完成,6已退款,7已删除 -->
|
||||||
@@ -243,8 +248,8 @@
|
|||||||
AND a.order_status = 1
|
AND a.order_status = 1
|
||||||
</if>
|
</if>
|
||||||
<if test="param.statusFilter == 6">
|
<if test="param.statusFilter == 6">
|
||||||
<!-- 6已退款:订单状态为退款成功 -->
|
<!-- 6退款/售后:订单状态为退款成功 -->
|
||||||
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)
|
||||||
</if>
|
</if>
|
||||||
<if test="param.statusFilter == 7">
|
<if test="param.statusFilter == 7">
|
||||||
<!-- 7已删除:订单被删除 -->
|
<!-- 7已删除:订单被删除 -->
|
||||||
|
|||||||
@@ -234,6 +234,10 @@ public class ShopOrderParam extends BaseParam {
|
|||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer userId;
|
private Integer userId;
|
||||||
|
|
||||||
|
@Schema(description = "用户昵称")
|
||||||
|
@QueryField(type = QueryType.LIKE)
|
||||||
|
private String nickname;
|
||||||
|
|
||||||
@Schema(description = "备注")
|
@Schema(description = "备注")
|
||||||
private String comments;
|
private String comments;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user