feat(order): 添加订单查询中的手机号和订单号筛选功能
- 在 GltTicketOrderMapper.xml 中新增订单号查询条件,支持按 ID 或订单号搜索 - 在 GltTicketOrderMapper.xml 中新增用户手机号查询条件 - 在 GltTicketOrderParam.java 中添加 phone 字段用于接收手机号参数 - 保持原有的关键词和其他查询条件不变 - 扩展了订单检索的灵活性和精确度
This commit is contained in:
@@ -87,6 +87,12 @@
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.orderNo != null">
|
||||
AND (a.id = #{param.orderNo} OR COALESCE(o.order_no, f.order_no) = #{param.orderNo})
|
||||
</if>
|
||||
<if test="param.phone != null">
|
||||
AND u.phone = #{param.phone}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (
|
||||
a.address LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
|
||||
@@ -42,6 +42,9 @@ public class GltTicketOrderParam extends BaseParam {
|
||||
@Schema(description = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "用户手机号")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "配送状态:10待配送、20配送中、30待客户确认、40已完成")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deliveryStatus;
|
||||
|
||||
Reference in New Issue
Block a user