Explorar o código

fix 订单查找

he2802 %!s(int64=4) %!d(string=hai) anos
pai
achega
8025b74da4

+ 15 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderQueryBo.java

@@ -67,5 +67,20 @@ public class OrderQueryBo extends BaseEntity {
 	/** 订单完成时间 */
 	@ApiModelProperty("订单完成时间")
 	private Long finishTime;
+	/** 用户昵称 */
+	@ApiModelProperty("用户昵称")
+	private String nickname;
+	/** 手机号码 */
+	@ApiModelProperty("手机号码")
+	private String telphone;
+	/** 支付金额 */
+	@ApiModelProperty("支付金额")
+	private BigDecimal payPrice;
+	/** 开始时间 */
+	@ApiModelProperty("开始时间")
+	private Long startTime;
+	/** 结束时间 */
+	@ApiModelProperty("结束时间")
+	private Long endTime;
 
 }

+ 23 - 0
zhongzheng-system/src/main/resources/mapper/modules/order/OrderMapper.xml

@@ -44,6 +44,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             `order` o
                 LEFT JOIN order_goods og ON o.oder_sn = og.order_sn
                 LEFT JOIN user u on o.user_id = u.user_id
+        WHERE
+            1 = 1
+        <if test="oderSn != null and oderSn != ''" >
+            AND o.oder_sn = #{oderSn}
+        </if>
+        <if test="orderStatus != null and orderStatus != ''" >
+            AND o.order_status = #{orderStatus}
+        </if>
+        <if test="nickname != null and nickname != ''" >
+            AND u.nickname like concat('%', #{nickname}, '%')
+        </if>
+        <if test="telphone != null and telphone != ''" >
+            AND u.telphone = #{telphone}
+        </if>
+        <if test="payPrice != null and payPrice != ''" >
+            AND o.pay_price = #{payPrice}
+        </if>
+        <if test="startTime != null and startTime != ''" >
+            AND o.pay_time > #{startTime}
+        </if>
+        <if test="endTime != null and endTime != ''" >
+            AND #{endTime} > o.pay_time
+        </if>
         ORDER BY
             order_id DESC
     </select>