|
@@ -66,10 +66,10 @@ func (s *CouponServ) GetCouponList(caseID, sendtype, usetype string, pagenavi ..
|
66
|
66
|
if usetype != "" {
|
67
|
67
|
switch usetype {
|
68
|
68
|
case models.COUPONCARD_USETYPE_LUCKDRAW:
|
69
|
|
- filters = append(filters, "coupon_id not in (select resource_id from sys_activity_action where active_type='"+models.ActGiveCoupon+"')")
|
|
69
|
+ filters = append(filters, "coupon_id not in (select resource_id from sys_activity_action where active_type='"+models.ActGiveCoupon+"') and used_count=0")
|
70
|
70
|
break
|
71
|
71
|
case models.COUPONCARD_USETYPE_SYS:
|
72
|
|
- filters = append(filters, "coupon_id not in (select coupon_card_id from ta_luckdraw_record where coupon_card_type='"+models.PRIZE_TYPE_COUPON+"')")
|
|
72
|
+ filters = append(filters, "coupon_id not in (select coupon_card_id from ta_luckdraw_record where coupon_card_type='"+models.PRIZE_TYPE_COUPON+"') and used_count=0")
|
73
|
73
|
break
|
74
|
74
|
}
|
75
|
75
|
}
|