diff --git a/internal/biz/timeslicequery/query.go b/internal/biz/timeslicequery/query.go index 30ef5c5..998046c 100644 --- a/internal/biz/timeslicequery/query.go +++ b/internal/biz/timeslicequery/query.go @@ -47,7 +47,7 @@ func (v *Query) queryExpired(ctx context.Context, order *bo.OrderBo) error { return err } - return nil // 过期不做通知 + return v.notify(ctx, order) } func (v *Query) notify(ctx context.Context, order *bo.OrderBo) error { diff --git a/internal/biz/vo/cmb.go b/internal/biz/vo/cmb.go index 7707d5d..d89d0b1 100644 --- a/internal/biz/vo/cmb.go +++ b/internal/biz/vo/cmb.go @@ -18,7 +18,8 @@ type CmbStatus string const ( CmbStatusSuccess CmbStatus = "0" // 券可用 CmbStatusUse CmbStatus = "1" // 券使用 - CmbStatusExpired CmbStatus = "2" // 券过期-待确认是否通知 + //CmbStatusExpired CmbStatus = "2" // 券过期-待确认是否通知 + CmbStatusExpired CmbStatus = "0" // 券过期-等于券没有使用 ) func (s CmbStatus) GetValue() string { diff --git a/internal/biz/vo/order_notify_event.go b/internal/biz/vo/order_notify_event.go index 84c6782..db5fb45 100644 --- a/internal/biz/vo/order_notify_event.go +++ b/internal/biz/vo/order_notify_event.go @@ -40,7 +40,7 @@ func (s OrderNotifyEvent) IsExpired() bool { } func (s OrderNotifyEvent) CanNotify() bool { - return s.IsSendDEd() || s.IsUsed() + return s.IsSendDEd() || s.IsUsed() || s.IsExpired() } var OrderNotifyEventMapCmbStatus = map[OrderNotifyEvent]CmbStatus{ diff --git a/test/coupon.go b/test/coupon.go new file mode 100644 index 0000000..56e5404 --- /dev/null +++ b/test/coupon.go @@ -0,0 +1 @@ +package test