|
@@ -177,6 +177,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
<if test="businessId != null and businessId != ''">
|
|
<if test="businessId != null and businessId != ''">
|
|
|
|
+ and og.`status` = 1
|
|
|
|
+ and og.refund_status in (0,1,3)
|
|
|
|
+ and og.pay_status in (2,3,4))
|
|
AND g.business_id = #{businessId}
|
|
AND g.business_id = #{businessId}
|
|
</if>
|
|
</if>
|
|
<if test="startTime != null and startTime != ''">
|
|
<if test="startTime != null and startTime != ''">
|
|
@@ -206,6 +209,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="empty != null and empty != ''" >
|
|
<if test="empty != null and empty != ''" >
|
|
and u.realname is NOT NULL
|
|
and u.realname is NOT NULL
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="goodsSearchKey != null and goodsSearchKey != ''" >
|
|
|
|
+ and ( SELECT
|
|
|
|
+ count(og.*)
|
|
|
|
+ FROM
|
|
|
|
+ `order` o
|
|
|
|
+ LEFT JOIN order_goods og on o.order_sn = og.order_sn
|
|
|
|
+ where 1=1
|
|
|
|
+ and og.`status` = 1
|
|
|
|
+ and og.refund_status in (0,1,3)
|
|
|
|
+ and og.pay_status in (2,3,4))
|
|
|
|
+ and (g.goods_name like concat('%', #{goodsSearchKey}, '%') or g.code like concat('%', #{goodsSearchKey}, '%'))
|
|
|
|
+ and o.user_id = u.user_id)>0
|
|
|
|
+ </if>
|
|
|
|
+ <if test="goodsSearchKey != null and goodsSearchKey != ''" >
|
|
|
|
+ and ( SELECT
|
|
|
|
+ count(og.*)
|
|
|
|
+ FROM
|
|
|
|
+ `order` o
|
|
|
|
+ LEFT JOIN order_goods og on o.order_sn = og.order_sn
|
|
|
|
+ where 1=1
|
|
|
|
+ and og.`status` = 1
|
|
|
|
+ and og.refund_status in (0,1,3)
|
|
|
|
+ and og.pay_status in (2,3,4))
|
|
|
|
+ and (g.goods_name like concat('%', #{goodsSearchKey}, '%') or g.code like concat('%', #{goodsSearchKey}, '%'))
|
|
|
|
+ and o.user_id = u.user_id)>0
|
|
|
|
+ </if>
|
|
<if test="gradePoint != null and gradePoint == 1" >
|
|
<if test="gradePoint != null and gradePoint == 1" >
|
|
AND (SELECT COUNT(u.user_id) FROM class_grade_user cgu where 1=1 AND u.status in (1) and cgu.user_id= u.user_id) > 0
|
|
AND (SELECT COUNT(u.user_id) FROM class_grade_user cgu where 1=1 AND u.status in (1) and cgu.user_id= u.user_id) > 0
|
|
</if>
|
|
</if>
|