|
|
@@ -51,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
<result property="remark" column="remark"/>
|
|
|
<result property="userId" column="user_id"/>
|
|
|
+ <result property="realname" column="realname"/>
|
|
|
<result property="rebuyOrderGoodsId" column="rebuy_order_goods_id"/>
|
|
|
|
|
|
<result property="code" column="code"/>
|
|
|
@@ -153,7 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
where 1=1
|
|
|
and og.`status` = 1
|
|
|
and og.refund_status in (0,1,3)
|
|
|
- and og.pay_status in (2,3)
|
|
|
+ and og.pay_status in (2,3,4)
|
|
|
AND (SELECT COUNT(1) FROM inform_user iu where iu.user_id = o.user_id and iu.goods_id = og.goods_id and system_status = 1) < 1
|
|
|
</select>
|
|
|
|
|
|
@@ -167,7 +168,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
where 1=1
|
|
|
and og.`status` = 1
|
|
|
and og.refund_status in (0,1,3)
|
|
|
- and og.pay_status in (2,3)
|
|
|
+ and og.pay_status in (2,3,4)
|
|
|
AND (SELECT COUNT(1) FROM inform_user iu where iu.user_id = o.user_id and iu.goods_id = og.goods_id and system_status = 3) < 1
|
|
|
|
|
|
</select>
|
|
|
@@ -182,7 +183,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
where 1=1
|
|
|
and og.`status` = 1
|
|
|
and og.refund_status in (0,1,3)
|
|
|
- and og.pay_status in (2,3)
|
|
|
+ and og.pay_status in (2,3,4)
|
|
|
and (SELECT COUNT(1) FROM user_exam_goods ueg where ueg.user_id = o.user_id and og.goods_id = ueg.goods_id) < 1
|
|
|
and (SELECT COUNT(1) FROM exam_number en LEFT JOIN exam_number_goods eng on en.exam_number_id = eng.exam_number_id where eng.goods_id = og.goods_id and en.`status` = 1) > 0
|
|
|
</select>
|
|
|
@@ -223,7 +224,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
LEFT JOIN `order` o on og.order_sn = o.order_sn
|
|
|
LEFT JOIN class_grade_user cgu ON cgu.grade_id = cg.grade_id and cgu.user_id = #{userId}
|
|
|
WHERE
|
|
|
- o.user_id = #{userId} and og.goods_id = #{goodsId} and og.pay_status in (2,3) and og.order_goods_id != #{orderGoodsId} and cgu.period_plush = 1
|
|
|
+ o.user_id = #{userId} and og.goods_id = #{goodsId} and og.pay_status in (2,3,4) and og.order_goods_id != #{orderGoodsId} and cgu.period_plush = 1
|
|
|
</select>
|
|
|
|
|
|
<select id="gradeGoods" parameterType="com.zhongzheng.modules.order.bo.OrderGoodsQueryBo" resultMap="OrderGoodsResultVo">
|
|
|
@@ -233,7 +234,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
order_goods og
|
|
|
LEFT JOIN `order` o on og.order_sn = o.order_sn
|
|
|
WHERE
|
|
|
- o.user_id = #{userId} and og.grade_id = #{gradeId} and og.pay_status in (2,3) and og.refund_status !=2
|
|
|
+ o.user_id = #{userId} and og.grade_id = #{gradeId} and og.pay_status in (2,3,4) and og.refund_status !=2
|
|
|
</select>
|
|
|
|
|
|
<select id="selectCanInvoiceList" parameterType="com.zhongzheng.modules.order.bo.OrderGoodsQueryBo" resultMap="OrderGoodsResultVo">
|
|
|
@@ -286,4 +287,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectBuyGoodsUserList" parameterType="com.zhongzheng.modules.order.bo.OrderGoodsQueryBo" resultMap="OrderGoodsResultVo">
|
|
|
+ SELECT
|
|
|
+ DISTINCT u.user_id,
|
|
|
+ u.realname
|
|
|
+ FROM
|
|
|
+ order_goods og
|
|
|
+ LEFT JOIN `order` o ON og.order_sn = o.order_sn
|
|
|
+ LEFT JOIN `user` u ON o.user_id = u.user_id
|
|
|
+ WHERE
|
|
|
+ og.`status` = 1
|
|
|
+ AND og.refund_status IN ( 0, 1, 3 )
|
|
|
+ AND og.pay_status IN ( 2, 3, 4 )
|
|
|
+ AND og.goods_id = #{goodsId}
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|