| | |
| | | AND (th.hb_type =1 or th.hb_type =2) |
| | | </if> |
| | | <if test="type != null and type == 2"> <!-- 分享订单 --> |
| | | AND (th.`hb_type` = 20 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | AND th.`hb_type` = 20 |
| | | </if> |
| | | <if test="type != null and type == 3"> <!-- 邀请订单 --> |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7) |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | </if> |
| | | <if test="orderNo != null"> |
| | | AND tc.co_order_no = #{orderNo} |
| | |
| | | AND (th.hb_type =1 or th.hb_type =2) |
| | | </if> |
| | | <if test="type != null and type == 2"> <!-- 分享订单 --> |
| | | AND (th.`hb_type` = 20 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | AND th.`hb_type` = 20 |
| | | </if> |
| | | <if test="type != null and type == 3"> <!-- 邀请订单 --> |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7) |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | </if> |
| | | <if test="orderNo != null"> |
| | | AND tc.co_order_no = #{orderNo} |
| | |
| | | AND (th.hb_type =1 or th.hb_type =2) |
| | | </if> |
| | | <if test="type != null and type == 2"> <!-- 分享订单 --> |
| | | AND (th.`hb_type` = 20 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | AND th.`hb_type` = 20 |
| | | </if> |
| | | <if test="type != null and type == 3"> <!-- 邀请订单 --> |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7) |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | </if> |
| | | |
| | | <if test="orderState != null and orderState == 1"> |
| | |
| | | (tr.`ho_hongbao_id` = th.`hb_id` OR |
| | | th.`hb_pid` = tr.`ho_hongbao_id` ) |
| | | WHERE th.`hb_uid` = ${uid} |
| | | AND (th.`hb_type` = 20 OR th.`hb_type` = 21 |
| | | OR th.`hb_type` = 22) |
| | | AND th.`hb_type` = 20 |
| | | <if test="day != null and day == 1"> |
| | | AND TO_DAYS(tc.`co_create_time`) = TO_DAYS(NOW()) |
| | | </if> |
| | |
| | | (tr.`ho_hongbao_id` = th.`hb_id` OR |
| | | th.`hb_pid` = tr.`ho_hongbao_id` ) |
| | | WHERE th.`hb_uid` = ${uid} |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR |
| | | th.`hb_type` = 7) |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7 OR th.`hb_type` = 21 OR th.`hb_type` = 22 ) |
| | | <if test="day != null and day == 1"> |
| | | AND TO_DAYS(tc.`co_create_time`) = TO_DAYS(NOW()) |
| | | </if> |
| | |
| | | AND (th.hb_type =1 or th.hb_type =2) |
| | | </if> |
| | | <if test="type != null and type == 2"> <!-- 分享订单 --> |
| | | AND (th.`hb_type` = 20 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | AND th.`hb_type` = 20 |
| | | </if> |
| | | <if test="type != null and type == 3"> <!-- 邀请订单 --> |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7) |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | </if> |
| | | <if test="startTime != null"> |
| | | AND <![CDATA[tc.co_create_time >= #{startTime}]]> |
| | |
| | | AND (th.hb_type =1 or th.hb_type =2) |
| | | </if> |
| | | <if test="type != null and type == 2"> <!-- 分享订单 --> |
| | | AND (th.`hb_type` = 20 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | AND th.`hb_type` = 20 |
| | | </if> |
| | | <if test="type != null and type == 3"> <!-- 邀请订单 --> |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7) |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | </if> |
| | | <if test="startTime != null"> |
| | | AND <![CDATA[tc.co_create_time >= #{startTime}]]> |
| | |
| | | AND (th.hb_type =1 or th.hb_type =2) |
| | | </if> |
| | | <if test="type != null and type == 2"> <!-- 分享订单 --> |
| | | AND (th.`hb_type` = 20 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | AND th.`hb_type` = 20 |
| | | </if> |
| | | <if test="type != null and type == 3"> <!-- 邀请订单 --> |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7) |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | </if> |
| | | <if test="startTime != null"> |
| | | AND <![CDATA[tc.co_create_time >= #{startTime}]]> |
| | |
| | | AND (th.hb_type =1 or th.hb_type =2) |
| | | </if> |
| | | <if test="type != null and type == 2"> <!-- 分享订单 --> |
| | | AND (th.`hb_type` = 20 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | AND th.`hb_type` = 20 |
| | | </if> |
| | | <if test="type != null and type == 3"> <!-- 邀请订单 --> |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7) |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | </if> |
| | | |
| | | <if test="day != null and day == 1"> <!-- 今天 --> |
| | |
| | | AND (th.hb_type =1 or th.hb_type =2) |
| | | </if> |
| | | <if test="type != null and type == 2"> <!-- 分享订单 --> |
| | | AND (th.`hb_type` = 20 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | AND th.`hb_type` = 20 |
| | | </if> |
| | | <if test="type != null and type == 3"> <!-- 邀请订单 --> |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7) |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | </if> |
| | | <if test="day != null and day == 1"> <!-- 今天 --> |
| | | AND TO_DAYS(tc.`co_create_time`) = TO_DAYS(NOW()) |
| | |
| | | AND (th.hb_type =1 or th.hb_type =2) |
| | | </if> |
| | | <if test="type != null and type == 2"> <!-- 分享订单 --> |
| | | AND (th.`hb_type` = 20 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | AND th.`hb_type` = 20 |
| | | </if> |
| | | <if test="type != null and type == 3"> <!-- 邀请订单 --> |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7) |
| | | AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7 OR th.`hb_type` = 21 OR th.`hb_type` = 22) |
| | | </if> |
| | | <if test="orderState != null and orderState == 1"> |
| | | AND (tc.co_state = 1 or tc.co_state = 2) <!-- 有效订单 --> |