|
@@ -219,7 +219,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
og.goods_received,
|
|
og.goods_received,
|
|
|
og.refund_status,
|
|
og.refund_status,
|
|
|
og.pay_status as goods_pay_status,
|
|
og.pay_status as goods_pay_status,
|
|
|
- (select cgu.period_plush from class_grade_user cgu where cgu.grade_id = og.grade_id and cgu.user_id = o.user_id limit 1 ) period_plush,
|
|
|
|
|
|
|
+ cgu.period_plush,
|
|
|
(SELECT oi.invoice_status FROM order_invoice oi LEFT JOIN order_invoice_order oio ON oio.invoice_id = oi.invoice_id WHERE
|
|
(SELECT oi.invoice_status FROM order_invoice oi LEFT JOIN order_invoice_order oio ON oio.invoice_id = oi.invoice_id WHERE
|
|
|
oio.order_goods_id = og.order_goods_id AND oi.period_status != 2 limit 1) invoice_status
|
|
oio.order_goods_id = og.order_goods_id AND oi.period_status != 2 limit 1) invoice_status
|
|
|
FROM
|
|
FROM
|
|
@@ -232,8 +232,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
LEFT JOIN course_business cb ON g.business_id = cb.id
|
|
LEFT JOIN course_business cb ON g.business_id = cb.id
|
|
|
LEFT JOIN school s ON s.id = g.school_id
|
|
LEFT JOIN school s ON s.id = g.school_id
|
|
|
LEFT JOIN major m ON g.major_id = m.id
|
|
LEFT JOIN major m ON g.major_id = m.id
|
|
|
|
|
+ LEFT JOIN order_goods og2 ON og.rebuy_order_goods_id = og2.order_goods_id
|
|
|
|
|
+ LEFT JOIN class_grade_user cgu on cgu.grade_id = og2.grade_id and cgu.user_id = o.user_id
|
|
|
WHERE 1=1
|
|
WHERE 1=1
|
|
|
-
|
|
|
|
|
|
|
+ AND og.rebuy_order_goods_id >0
|
|
|
|
|
+ AND cgu.period_plush = 1
|
|
|
<if test="educationTypeId != null and educationTypeId != ''">
|
|
<if test="educationTypeId != null and educationTypeId != ''">
|
|
|
AND g.education_type_id = #{educationTypeId}
|
|
AND g.education_type_id = #{educationTypeId}
|
|
|
</if>
|
|
</if>
|
|
@@ -276,9 +279,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="refundStatus != null">
|
|
<if test="refundStatus != null">
|
|
|
AND og.refund_status = #{refundStatus}
|
|
AND og.refund_status = #{refundStatus}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="goodsType != null">
|
|
|
|
|
- AND g.goods_type = #{goodsType}
|
|
|
|
|
- </if>
|
|
|
|
|
|
|
+ AND g.goods_type = 1
|
|
|
<if test="userId != null">
|
|
<if test="userId != null">
|
|
|
AND u.user_id = #{userId}
|
|
AND u.user_id = #{userId}
|
|
|
AND og.pay_status in (2,3,4)
|
|
AND og.pay_status in (2,3,4)
|