From c2540aa4878c88dcf26b5c337cd3f11239b8ebbf Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 21 Jun 2024 09:55:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- consume/zhios_installment_payment_auto_repaid_consume.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/consume/zhios_installment_payment_auto_repaid_consume.go b/consume/zhios_installment_payment_auto_repaid_consume.go index d61b87b..ab3fbd1 100644 --- a/consume/zhios_installment_payment_auto_repaid_consume.go +++ b/consume/zhios_installment_payment_auto_repaid_consume.go @@ -35,7 +35,7 @@ func InstallmentPaymentAutoRepaidConsume(queue md.MqQueue) { if ok == true { //fmt.Println(string(res.Body)) fmt.Println(">>>>>>>>>>>>>>>>InstallmentPaymentAutoRepaidConsume<<<<<<<<<<<<<<<<<<<<<<<<<") - err = handleInstallmentPaymentAutoRepaidConsume(res.Body) + err = handleInstallmentPaymentAutoRepaidConsume(ch, res.Body) if err != nil { fmt.Println("handleInstallmentPaymentAutoRepaidConsumeERR:::::", err.Error()) } @@ -49,7 +49,7 @@ func InstallmentPaymentAutoRepaidConsume(queue md.MqQueue) { fmt.Println("get msg done") } -func handleInstallmentPaymentAutoRepaidConsume(msgData []byte) error { +func handleInstallmentPaymentAutoRepaidConsume(ch *rabbit.Channel, msgData []byte) error { time.Sleep(time.Duration(1) * time.Millisecond) //休眠1毫秒 //1、解析mq中queue的数据结构体 @@ -61,6 +61,6 @@ func handleInstallmentPaymentAutoRepaidConsume(msgData []byte) error { engine := db.DBs[msg.MasterId] //2、调用 `DealInstallmentPaymentAutoRepaid` 制度方法进行扣款 - err = installment_payment.DealInstallmentPaymentAutoRepaid(engine, *msg, msg.MasterId) + err = installment_payment.DealInstallmentPaymentAutoRepaid(engine, ch, *msg, msg.MasterId) return nil }