Skip to content

Commit

Permalink
refactor(payment): 实现与微信对账及关闭超时支付的定时任务 (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
longyue0521 authored Apr 30, 2024
1 parent 88b2eaa commit 1fc8bc0
Show file tree
Hide file tree
Showing 15 changed files with 1,629 additions and 162 deletions.
5 changes: 4 additions & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ kafka:
cron:
close:
enableSeconds: true # 是否使用秒作解析器,默认否
spec: "0 0 0 * * *" # 执行时间,每天 00:00:00 开始执行
spec: "0 0 0 * * *" # 执行时间,每天 00:00:00 开始执行
syncWechat:
enableSeconds: true # 是否使用秒作解析器,默认否
spec: "*/30 * * * *" # 执行时间,每30分钟执行一次
13 changes: 7 additions & 6 deletions internal/payment/internal/domain/payment.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ const (

type PaymentStatus uint8

func (s PaymentStatus) ToUnit8() uint8 {
func (s PaymentStatus) ToUint8() uint8 {
return uint8(s)
}

const (
PaymentStatusUnpaid PaymentStatus = 1
PaymentStatusProcessing PaymentStatus = 2
PaymentStatusPaidSuccess PaymentStatus = 3
PaymentStatusPaidFailed PaymentStatus = 4
PaymentStatusRefund PaymentStatus = 5
PaymentStatusUnpaid PaymentStatus = 1
PaymentStatusProcessing PaymentStatus = 2
PaymentStatusPaidSuccess PaymentStatus = 3
PaymentStatusPaidFailed PaymentStatus = 4
PaymentStatusRefund PaymentStatus = 5
PaymentStatusTimeoutClosed PaymentStatus = 6
)

type Amount struct {
Expand Down
Loading

0 comments on commit 1fc8bc0

Please sign in to comment.