| | |
| | | and t1.code LIKE CONCAT('%',#{req.code},'%') |
| | | </if> |
| | | <if test="req.type != null and req.type != '' and req.type == 1"> |
| | | and t1.coupon_discount_amount != null and t1.coupon_discount_amount != 0 |
| | | and t1.coupon_discount_amount IS NOT NULL and t1.coupon_discount_amount != 0 |
| | | </if> |
| | | <if test="req.type != null and req.type != '' and req.type == 2"> |
| | | and t1.vip_discount_amount != null and t1.vip_discount_amount != 0 |
| | | and t1.vip_discount_amount IS NOT NULL and t1.vip_discount_amount != 0 |
| | | </if> |
| | | <if test="null != req.userIds and req.userIds.size()>0" > |
| | | and t1.app_user_id in |
| | |
| | | and t2.code LIKE CONCAT('%',#{req.code},'%') |
| | | </if> |
| | | <if test="req.type != null and req.type != '' and req.type == 1"> |
| | | and t2.coupon_discount_amount != null and t1.coupon_discount_amount != 0 |
| | | and t2.coupon_discount_amount IS NOT NULL and t2.coupon_discount_amount != 0 |
| | | </if> |
| | | <if test="req.type != null and req.type != '' and req.type == 2"> |
| | | and t2.vip_discount_amount != null and t1.vip_discount_amount != 0 |
| | | and t2.vip_discount_amount IS NOT NULL and t2.vip_discount_amount != 0 |
| | | </if> |
| | | <if test="req.type == null "> |
| | | and t2.vip_discount_amount != null and t1.vip_discount_amount != 0 and t2.coupon_discount_amount != null and t1.coupon_discount_amount != 0 |
| | | and t2.vip_discount_amount IS NOT NULL and t2.vip_discount_amount != 0 and t2.coupon_discount_amount IS NOT NULL and t2.coupon_discount_amount != 0 |
| | | </if> |
| | | <if test="null != req.userIds and req.userIds.size()>0" > |
| | | and t2.app_user_id in |
| | |
| | | 3 as orderType |
| | | from t_vip_order t3 |
| | | where 1 = 1 |
| | | and t3.type ==1 |
| | | and t3.type =1 |
| | | <if test="null != req.code and req.code!=''"> |
| | | and t3.code LIKE CONCAT('%',#{req.code},'%') |
| | | </if> |
| | | <if test="req.type == null "> |
| | | and t3.discount_amount != null and t3.discount_amount != 0 |
| | | and t3.discount_amount IS NOT NULL and t3.discount_amount != 0 |
| | | </if> |
| | | <if test="null != req.userIds and req.userIds.size()>0" > |
| | | and t3.app_user_id in |
| | |
| | | and t4.code LIKE CONCAT('%',#{req.code},'%') |
| | | </if> |
| | | <if test="req.type == null "> |
| | | and t4.discount_amount != null and t4.discount_amount != 0 |
| | | and t4.discount_amount IS NOT NULL and t4.discount_amount != 0 |
| | | </if> |
| | | <if test="null != req.userIds and req.userIds.size()>0" > |
| | | and t4.app_user_id in |