diff --git a/backend/.gitignore b/backend/.gitignore index 6d47673..d7c2a39 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -27,3 +27,5 @@ go.work.sum # vendor/ fixtures/* + +quyun diff --git a/backend/app/jobs/wechat_pay_notify.go b/backend/app/jobs/wechat_pay_notify.go index 6c9e25d..202a5c2 100644 --- a/backend/app/jobs/wechat_pay_notify.go +++ b/backend/app/jobs/wechat_pay_notify.go @@ -30,7 +30,7 @@ func (s WechatPayNotify) InsertOpts() InsertOpts { } } -func (WechatPayNotify) Kind() string { return "wechat_callback" } +func (WechatPayNotify) Kind() string { return "wechat_pay_notify" } func (a WechatPayNotify) UniqueID() string { return a.Kind() } var _ Worker[WechatPayNotify] = (*WechatPayNotifyWorker)(nil) diff --git a/backend/app/jobs/wechat_pay_notify_test.go b/backend/app/jobs/wechat_pay_notify_test.go index 37434d3..9334a89 100644 --- a/backend/app/jobs/wechat_pay_notify_test.go +++ b/backend/app/jobs/wechat_pay_notify_test.go @@ -7,9 +7,6 @@ import ( "quyun/app/models" "quyun/app/service/testx" - "quyun/providers/ali" - "quyun/providers/app" - "quyun/providers/job" "quyun/providers/wepay" . "github.com/riverqueue/river" @@ -24,9 +21,6 @@ type WechatPayNotifySuiteInjectParams struct { dig.In Initials []contracts.Initial `group:"initials"` // nolint:structcheck - Job *job.Job - Oss *ali.OSSClient - App *app.Config } type WechatPayNotifySuite struct { @@ -46,27 +40,7 @@ func Test_WechatPayNotify(t *testing.T) { func (t *WechatPayNotifySuite) Test_Work() { Convey("test_work", t.T(), func() { Convey("step 1", func() { - notify := `{ - "mchid": "1702644947", - "appid": "wx47649361b6eba174", - "out_trade_no": "20250430192543", - "transaction_id": "4200002602202504300651871941", - "trade_type": "JSAPI", - "trade_state": "SUCCESS", - "trade_state_desc": "支付成功", - "bank_type": "OTHERS", - "attach": "", - "success_time": "2025-04-30T19:25:51+08:00", - "payer": { - "openid": "o5Bzk644x3LOMJsKSZRlqWin74IU" - }, - "amount": { - "total": 1, - "payer_total": 1, - "currency": "CNY", - "payer_currency": "CNY" - } -}` + notify := `{ "mchid": "1702644947", "appid": "wx47649361b6eba174", "out_trade_no": "20250430192543", "transaction_id": "4200002602202504300651871941", "trade_type": "JSAPI", "trade_state": "SUCCESS", "trade_state_desc": "支付成功", "bank_type": "OTHERS", "attach": "", "success_time": "2025-04-30T19:25:51+08:00", "payer": { "openid": "o5Bzk644x3LOMJsKSZRlqWin74IU" }, "amount": { "total": 1, "payer_total": 1, "currency": "CNY", "payer_currency": "CNY" } }` var payNotify wepay.PayNotify err := json.Unmarshal([]byte(notify), &payNotify) diff --git a/backend/quyun b/backend/quyun deleted file mode 100755 index e1ea1f5..0000000 Binary files a/backend/quyun and /dev/null differ