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 }