This commit is contained in:
ziming 2025-08-01 10:49:29 +08:00
parent 9ff1a88233
commit ad380958a0
4 changed files with 5 additions and 3 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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{

1
test/coupon.go Normal file
View File

@ -0,0 +1 @@
package test