From ef279fb0e163ed5f12f9e6ac4159962d8ff34b7a Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 27 Feb 2024 08:54:45 +0800 Subject: [PATCH 1/2] =?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_order_hjy.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/consume/zhios_order_hjy.go b/consume/zhios_order_hjy.go index 3cb7fec..178106e 100644 --- a/consume/zhios_order_hjy.go +++ b/consume/zhios_order_hjy.go @@ -173,6 +173,12 @@ func handleZhiosOrderHjy(msg []byte) error { // } // //} + var ordRelate = make([]model.OrdListRelate, 0) + sess.Where("oid=?", canalMsg.Oid).Find(&ordRelate) + if len(ordRelate) > 0 { + sess.Commit() + return nil + } if ordData.State != 4 && int64(ordData.ConfirmAt) > 0 && int64(ordData.ConfirmAt) < utils.TimeStdParseUnix("2023-11-01 00:00:00") { ordData.State = 5 ordData.SettleAt = ordData.ConfirmAt From 11d0a7532363e3c40cfa5111875cd84a5c759978 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 27 Feb 2024 09:59:45 +0800 Subject: [PATCH 2/2] =?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_order_hjy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consume/zhios_order_hjy.go b/consume/zhios_order_hjy.go index 178106e..17374ec 100644 --- a/consume/zhios_order_hjy.go +++ b/consume/zhios_order_hjy.go @@ -32,7 +32,7 @@ func ZhiosOrderHjy(queue md.MqQueue) { //1、将自己绑定到交换机上 ch.Bind(queue.Name, queue.ExchangeName, queue.RoutKey) //2、取出数据进行消费 - ch.Qos(1000) + ch.Qos(500) delivery := ch.Consume(queue.Name, false) var res amqp.Delivery