From 1f3048adec00cc6ee6663403def52eb30c5a7571 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sun, 21 Apr 2024 19:40:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E4=B8=AA=E6=A9=98=E5=AD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- consume/zhios_user_integral_exchange.go | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/consume/zhios_user_integral_exchange.go b/consume/zhios_user_integral_exchange.go index a3ce130..c6074ab 100644 --- a/consume/zhios_user_integral_exchange.go +++ b/consume/zhios_user_integral_exchange.go @@ -41,21 +41,8 @@ func CancalUserIntegralExchange(queue md.MqQueue) { err = handleCancalUserIntegralExchange(res.Body) //_ = res.Reject(false) fmt.Println(err) - if err == nil { - _ = res.Ack(true) - } else { - var canalMsg *md.ZhiosAcquisition - var tmpString string - err := json.Unmarshal(res.Body, &tmpString) - if err == nil { - fmt.Println(tmpString) - err = json.Unmarshal([]byte(tmpString), &canalMsg) - if err == nil { - ch.Publish(queue.ExchangeName, utils.SerializeStr(canalMsg), queue.RoutKey) - } - } + _ = res.Ack(true) - } } else { panic(errors.New("error getting message")) } @@ -96,7 +83,7 @@ func handleCancalUserIntegralExchange(msg []byte) error { err := CoinExchange(eg, sess, utils.StrToInt(uid), utils.IntToStr(base.CoinId), "cny", amount.Amount, mid) if err != nil { sess.Rollback() - return err + return nil } } sess.Commit()