|
@@ -55,7 +55,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND oh.education_type_id = #{educationTypeId}
|
|
|
</if>
|
|
|
<if test="searchKey != null and searchKey != ''">
|
|
|
- AND (select count(*) from `order` o left JOIN `user` u on o.user_id = u.user_id left JOIN order_goods og on o.order_sn = og.order_sn LEFT JOIN goods g on og.goods_id = g.goods_id where o.handle_order_sn = oh.handle_order_sn and (u.realname like concat('%', #{searchKey}, '%') or (u.id_card = #{searchKey,typeHandler=com.zhongzheng.common.type.EncryptHandler}) or (g.goods_name like concat('%', #{searchKey}, '%'))))>0
|
|
|
+ AND (select count(*) from `order` o left JOIN `user` u on o.user_id = u.user_id
|
|
|
+ left JOIN order_goods og on o.order_sn = og.order_sn
|
|
|
+ LEFT JOIN goods g on og.goods_id = g.goods_id
|
|
|
+ where o.handle_order_sn = oh.handle_order_sn and (u.realname like concat('%', #{searchKey}, '%') or (u.id_card = #{searchKey,typeHandler=com.zhongzheng.common.type.EncryptHandler}) or (g.goods_name like concat('%', #{searchKey}, '%'))))>0
|
|
|
</if>
|
|
|
<if test="goodsType != null">
|
|
|
AND oh.goods_type = #{goodsType}
|
|
@@ -70,10 +73,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND oh.refund_status = #{refundStatus}
|
|
|
</if>
|
|
|
<if test="startTime != null and startTime != ''">
|
|
|
- AND oh.check_time >= #{startTime}
|
|
|
+ AND oh.pay_time >= #{startTime}
|
|
|
</if>
|
|
|
<if test="endTime != null and endTime != ''">
|
|
|
- AND oh.check_time <= #{endTime}
|
|
|
+ AND oh.pay_time <= #{endTime}
|
|
|
</if>
|
|
|
<if test="payStatus != null">
|
|
|
AND oh.pay_status = #{payStatus}
|
|
@@ -131,5 +134,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="refundStatus != null and invoiceStatus == 0">
|
|
|
AND og.refund_status = 1
|
|
|
</if>
|
|
|
+ <if test="refundStatus != null and invoiceStatus == null">
|
|
|
+ AND og.refund_status = #{refundStatus}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
</mapper>
|