| | |
| | | a.qrCode, |
| | | a.participateCount,a.state,IFNULL(b.count, 0) AS `count` |
| | | from t_activity_generalization a |
| | | LEFT join (SELECT userId,couponActivityId, activityType,COUNT(*) AS `count` FROM t_user_coupon_record where activityType = 5 GROUP BY userId) b |
| | | LEFT join (SELECT userId,couponActivityId, activityType,COUNT(*) AS `count` FROM t_user_coupon_record where activityType = 5 GROUP BY couponActivityId) b |
| | | ON a.id = b.couponActivityId |
| | | WHERE a.isDelete = 1 |
| | | <if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''"> |